summaryrefslogtreecommitdiffstats
path: root/Completion/User/_diff_options
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-11 00:08:11 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-11 00:08:11 +0000
commitc2943574773ad1584f1d868a1a2d38266af7dde4 (patch)
tree77db7dac4b9d70bffaf5a218af0df4904aef59af /Completion/User/_diff_options
parentzsh-workers/10044 (diff)
downloadzsh-c2943574773ad1584f1d868a1a2d38266af7dde4.tar
zsh-c2943574773ad1584f1d868a1a2d38266af7dde4.tar.gz
zsh-c2943574773ad1584f1d868a1a2d38266af7dde4.tar.bz2
zsh-c2943574773ad1584f1d868a1a2d38266af7dde4.tar.lz
zsh-c2943574773ad1584f1d868a1a2d38266af7dde4.tar.xz
zsh-c2943574773ad1584f1d868a1a2d38266af7dde4.tar.zst
zsh-c2943574773ad1584f1d868a1a2d38266af7dde4.zip
zsh-workers/10058
Diffstat (limited to 'Completion/User/_diff_options')
-rw-r--r--Completion/User/_diff_options17
1 files changed, 7 insertions, 10 deletions
diff --git a/Completion/User/_diff_options b/Completion/User/_diff_options
index 5f5f70738..d5d16ad55 100644
--- a/Completion/User/_diff_options
+++ b/Completion/User/_diff_options
@@ -2,23 +2,20 @@
local of ofwuc ouc oss ofwy ofwg ofwl cmd
-(( $+_diff_is_gnu )) || typeset -gA _diff_is_gnu
+(( $+_is_gnu )) || typeset -gA _is_gnu
-if (( ! $+_diff_is_gnu[$words[1]] )); then
- if [[ "$words[1]" = *diff ]]; then
- cmd="$words[1]"
- else
- cmd=diff
- fi
+cmd="$1"
+shift
+if (( ! $+_is_gnu[$cmd] )); then
if [[ $(_call version $cmd -v </dev/null 2>/dev/null) = *GNU* ]]; then
- _diff_is_gnu[$words[1]]=yes
+ _is_gnu[$cmd]=yes
else
- _diff_is_gnu[$words[1]]=
+ _is_gnu[$cmd]=
fi
fi
-if [[ -n "$_diff_is_gnu[$words[1]]" ]]; then
+if [[ -n "$_is_gnu[$cmd]" ]]; then
# output formats
of="-y --side-by-side -n --rcs -e -f --ed -q --brief -c -C --context -u -U \
--unified --old-group-format --new-group-format --changed-group-format \