diff options
author | Matteo Pasotti <matteo.pasotti@gmail.com> | 2014-12-18 20:22:38 +0100 |
---|---|---|
committer | Matteo Pasotti <matteo.pasotti@gmail.com> | 2014-12-18 20:22:38 +0100 |
commit | 940ff71a7ec45bc805efad9a3192d8934b9f6e54 (patch) | |
tree | 48473243599878ee15f106c449254bc9adca04fc /extras/bash_completion | |
parent | 0317129db4a4b230389e9ce23eca0a9be1ddcd2f (diff) | |
download | manatools-940ff71a7ec45bc805efad9a3192d8934b9f6e54.tar manatools-940ff71a7ec45bc805efad9a3192d8934b9f6e54.tar.gz manatools-940ff71a7ec45bc805efad9a3192d8934b9f6e54.tar.bz2 manatools-940ff71a7ec45bc805efad9a3192d8934b9f6e54.tar.xz manatools-940ff71a7ec45bc805efad9a3192d8934b9f6e54.zip |
added basic bash completion for mana
Diffstat (limited to 'extras/bash_completion')
-rw-r--r-- | extras/bash_completion/mana | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/extras/bash_completion/mana b/extras/bash_completion/mana new file mode 100644 index 00000000..74370b21 --- /dev/null +++ b/extras/bash_completion/mana @@ -0,0 +1,18 @@ +# mana(1) completion -*- shell-script -*- + +_mana() +{ + local cur prev words cword + _init_completion || return + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -u "$cur" ) ) + else + local opts=$( _parse_help "$1" ) + [[ $opts ]] || opts="user host proxy service log" # POSIX fallback + COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) ) + fi +} && +complete -F _mana mana + +# ex: ts=4 sw=4 et filetype=sh |