summaryrefslogtreecommitdiffstats
path: root/completions/help
diff options
context:
space:
mode:
Diffstat (limited to 'completions/help')
-rw-r--r--completions/help16
1 files changed, 16 insertions, 0 deletions
diff --git a/completions/help b/completions/help
new file mode 100644
index 0000000..679ea9f
--- /dev/null
+++ b/completions/help
@@ -0,0 +1,16 @@
+# bash completion for help -*- shell-script -*-
+
+_comp_cmd_help()
+{
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
+
+ if [[ $cur == -* ]]; then
+ _comp_compgen_usage -c help -s "$1"
+ return
+ fi
+
+ _comp_compgen -- -A helptopic
+ ((${#COMPREPLY[*]} != 1)) || printf -v "COMPREPLY[0]" %q "$COMPREPLY"
+} &&
+ complete -F _comp_cmd_help help