mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
bash-completion: bootctl: suggest argument for --path option
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user