mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
fall back to filedir completion
This commit is contained in:
parent
312092086b
commit
e503748591
1 changed files with 5 additions and 0 deletions
|
@ -88,6 +88,11 @@ __handle_reply()
|
||||||
fi
|
fi
|
||||||
COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )
|
COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )
|
||||||
|
|
||||||
|
if [[ ${#completions[@]} -eq 0 ]]; then
|
||||||
|
__debug "${FUNCNAME}: no known completions, falling back to _filedir"
|
||||||
|
_filedir
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
|
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
|
||||||
declare -F __custom_func >/dev/null && __custom_func
|
declare -F __custom_func >/dev/null && __custom_func
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue