diff options
| author | dana <dana@dana.is> | 2026-05-02 19:14:35 -0500 |
|---|---|---|
| committer | dana <dana@dana.is> | 2026-05-02 19:19:11 -0500 |
| commit | ef2c40fe73e50fefda7946c4c971cd2898bd6469 (patch) | |
| tree | d76ec9359080e7b6735c6fa31f3e31d9cfbbca75 /Completion | |
| parent | unposted: remove the 'this' from 'show this help and exit' in completers (diff) | |
| download | zsh-ef2c40fe73e50fefda7946c4c971cd2898bd6469.tar zsh-ef2c40fe73e50fefda7946c4c971cd2898bd6469.tar.gz zsh-ef2c40fe73e50fefda7946c4c971cd2898bd6469.tar.bz2 zsh-ef2c40fe73e50fefda7946c4c971cd2898bd6469.tar.lz zsh-ef2c40fe73e50fefda7946c4c971cd2898bd6469.tar.xz zsh-ef2c40fe73e50fefda7946c4c971cd2898bd6469.tar.zst zsh-ef2c40fe73e50fefda7946c4c971cd2898bd6469.zip | |
Diffstat (limited to 'Completion')
| -rw-r--r-- | Completion/Unix/Command/_echo | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_echo b/Completion/Unix/Command/_echo new file mode 100644 index 000000000..e835847c2 --- /dev/null +++ b/Completion/Unix/Command/_echo @@ -0,0 +1,32 @@ +#compdef echo gecho + +local variant +local -a args + +_pick_variant -r variant -b zsh gnu='Free Soft' $OSTYPE --version + +args=( + # these are only interpreted as options when they're the only arg + + gnu-hv + '(-)--help[display help information]' + '(-)--version[display version information]' + + other + '(gnu-hv -E)-e[interpret escape sequences]' + "(gnu-hv -e)-E[don't interpret escape sequences]" + "(gnu-hv)-n[don't output trailing newline]" +) + +case $variant in + gnu) ;; # pass + zsh|openbsd*) + args=( ${args:#(|\(*\))--*} ) + ;; + darwin*|dragonfly*|netbsd*|freebsd*) + args=( ${args:#(|\(*\))(--|-[eE]\[)*} ) + ;; + *) + args=( ) + ;; +esac + +_arguments -s -A '' : $args '*:string:_default' |
