diff --git a/share/completions/env.fish b/share/completions/env.fish new file mode 100644 index 000000000..828ae8942 --- /dev/null +++ b/share/completions/env.fish @@ -0,0 +1,10 @@ + +complete -c env -a "(set -n)=" -x -d (N_ "Redefine variable") + +complete -c env -a "(__fish_complete_subcommand -- -u --unset)" -d (N_ "Command") + +complete -c env -s i -l ignore-environment -d (N_ "Start with an empty environment") +complete -c env -s u -l unset -d (N_ "Remove variable from the environment") -x -a "(set -n)" +complete -c env -l help -d (N_ "Display help and exit") +complete -c env -l version -d (N_ "Display version and exit") + diff --git a/share/functions/__fish_complete_subcommand.fish b/share/functions/__fish_complete_subcommand.fish index 4af0e1c90..8fd9a6b92 100644 --- a/share/functions/__fish_complete_subcommand.fish +++ b/share/functions/__fish_complete_subcommand.fish @@ -23,6 +23,7 @@ function __fish_complete_subcommand -d "Complete subcommand" switch $i case '-*' + case '*=*' case '*' set had_cmd 1