diff options
Diffstat (limited to 'data/bash-completion')
-rw-r--r-- | data/bash-completion/dm-tool | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/data/bash-completion/dm-tool b/data/bash-completion/dm-tool new file mode 100644 index 00000000..15503959 --- /dev/null +++ b/data/bash-completion/dm-tool @@ -0,0 +1,51 @@ +#-*- mode: shell-script;-*- + +_dm_tool() +{ + local cur prev opts + _init_completion || return + opts='switch-to-greeter switch-to-user switch-to-guest lock list-seats add-nested-seat add-local-x-seat add-seat' + + case "$prev" in + switch-to-greeter) + return 0 + ;; + switch-to-user) + COMPREPLY=($(compgen -u -- "${cur}")) + return 0 + ;; + switch-to-guest) + # FIXME: session name + return 0 + ;; + lock) + return 0 + ;; + list-seats) + return 0 + ;; + add-nested-seat) + # FIXME ... + return 0 + ;; + add-local-x-seat) + # FIXME ... + return 0 + ;; + add-seat) + # FIXME ... + return 0 + ;; + *) + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) + return 0 + fi + + COMPREPLY=($(compgen -W "${opts}" -- "${cur}")) + return 0 +} +complete -F _dm_tool dm-tool |