bash-completion: bootctl: suggest argument for --path option
This commit is contained in:
parent
8ed22786aa
commit
ed0c5a6f89
|
@ -32,6 +32,21 @@ _bootctl() {
|
|||
[ARG]='--path'
|
||||
)
|
||||
|
||||
if __contains_word "$prev" ${OPTS[ARG]}; then
|
||||
case $prev in
|
||||
--path)
|
||||
if [[ -z $cur ]]; then
|
||||
comps=$(compgen -A directory -- "/" )
|
||||
else
|
||||
comps=$(compgen -A directory -- "$cur" )
|
||||
fi
|
||||
compopt -o filenames
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ "$cur" = -* ]]; then
|
||||
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
||||
return 0
|
||||
|
|
Loading…
Reference in New Issue