aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/bash_completion/mana18
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