autocompleter

This commit is contained in:
2019-10-31 12:48:36 +02:00
parent fbbef99305
commit b26dbf3216

View File

@@ -247,11 +247,11 @@ _get_completer() {
local curr_arg local curr_arg
curr_arg=${COMP_WORDS[COMP_CWORD]} curr_arg=${COMP_WORDS[COMP_CWORD]}
if [[ $COMP_CWORD -eq 1 ]]; then if [[ $COMP_CWORD -eq 1 ]]; then
COMPREPLY=( $(compgen -W "help autocomplete list copy paste read write delete url update upload self" -- $curr_arg ) ); COMPREPLY=( $(compgen -W "help autocomplete list copy paste read write delete url short short-del update upload self" -- $curr_arg ) );
fi fi
if [[ $COMP_CWORD -eq 2 ]]; then if [[ $COMP_CWORD -eq 2 ]]; then
case ${COMP_WORDS[$(( $COMP_CWORD - 1 ))]} in case ${COMP_WORDS[$(( $COMP_CWORD - 1 ))]} in
r*|url|d*) r*|url|d*|short*)
local remotelist=$( eval FLIP_EXEC simplelist ) local remotelist=$( eval FLIP_EXEC simplelist )
COMPREPLY=( $(compgen -W "$remotelist" -- $curr_arg ) ); COMPREPLY=( $(compgen -W "$remotelist" -- $curr_arg ) );
;; ;;