summaryrefslogtreecommitdiffstats
path: root/completions/printenv
diff options
context:
space:
mode:
Diffstat (limited to 'completions/printenv')
-rw-r--r--completions/printenv23
1 files changed, 23 insertions, 0 deletions
diff --git a/completions/printenv b/completions/printenv
new file mode 100644
index 0000000..3553e83
--- /dev/null
+++ b/completions/printenv
@@ -0,0 +1,23 @@
+# printenv(1) completion -*- shell-script -*-
+
+_printenv()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ case $prev in
+ --help | --version)
+ return
+ ;;
+ esac
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ return
+ fi
+
+ COMPREPLY=($(compgen -v -- "$cur"))
+} &&
+ complete -F _printenv printenv
+
+# ex: filetype=sh