Expect file arguments for any argument that is not an option
This commit is contained in:
parent
f10bc289c6
commit
5cd729f5ab
|
@ -186,7 +186,8 @@ function _picocli_filebot() {
|
||||||
if [[ "${CURR_WORD}" == -* ]]; then
|
if [[ "${CURR_WORD}" == -* ]]; then
|
||||||
COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS}" -- ${CURR_WORD}) )
|
COMPREPLY=( $(compgen -W "${FLAG_OPTS} ${ARG_OPTS}" -- ${CURR_WORD}) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $(compgen -W "${COMMANDS}" -- ${CURR_WORD}) )
|
compopt -o filenames
|
||||||
|
COMPREPLY=( $( compgen -f -- ${CURR_WORD} ) ) # files
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import static net.filebot.WebServices.*;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -129,7 +128,7 @@ class BashCompletionBuilder {
|
||||||
public File license;
|
public File license;
|
||||||
|
|
||||||
@Parameters
|
@Parameters
|
||||||
public List<String> arguments = new ArrayList<String>();
|
public List<File> arguments;
|
||||||
|
|
||||||
private static class DatabaseCompletionCandidates implements Iterable<String> {
|
private static class DatabaseCompletionCandidates implements Iterable<String> {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue