about summary refs log tree commit diff
path: root/Completion/Unix/Command/_env
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_env')
-rw-r--r--Completion/Unix/Command/_env7
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env
index a5dd49d37..8cf0ad467 100644
--- a/Completion/Unix/Command/_env
+++ b/Completion/Unix/Command/_env
@@ -9,6 +9,7 @@ case $variant in
     (( $#words > 2 )) && ign='!'
     args=(
       '(-)'{-i,--ignore-environment}'[start with empty environment]'
+      '(* -0 --null)'{-0,--null}'[end each output line with NUL, not newline]'
       '(--ignore-environment -i --help --version)*'{-u+,--unset=}'[remove variable from the environment]:env var to remove:_parameters -g "*export*"'
       '(-C --chdir)'{-C+,--chdir=}'[change working directory]:directory:_directories'
       '(-S --split-string)'{-S+,--split-string=}'[perform word splitting]:string to split'
@@ -23,11 +24,13 @@ case $variant in
   ;;
   freebsd*)
     args=(
-      '-0[use NUL, not newline after each variable in output]'
       '-L[add variables from system login.conf(5)]: :->user-class'
       '-U[add variables from user and system login.conf(5)]: :->user-class'
     )
   ;|
+  freebsd*|darwin*)
+    args=( '-0[use NUL, not newline after each variable in output]' )
+  ;|
   freebsd*|darwin*|dragonfly*)
     args+=(
       '(-i)*-u+[remove variable from the environment]:env var to remove:_parameters -g "*export*"'
@@ -58,7 +61,7 @@ if [[ -n $state ]]; then
         shift words
         (( CURRENT-- ))
       done
-      _normal && ret=0
+      _normal -p env && ret=0
     ;;
     user-class)
       if compset -P 1 '*/'; then