about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2000-04-11 23:34:39 +0000
committerClint Adams <clint@users.sourceforge.net>2000-04-11 23:34:39 +0000
commitc39481cb6d172d4e77bdc1e963d13cbdbea64954 (patch)
tree33e4b18d69e5894d2326ea1ed238b1173df985e4
parent5a69fda2a1f047208888b58edb9dbc3f8ae08440 (diff)
downloadzsh-c39481cb6d172d4e77bdc1e963d13cbdbea64954.tar.gz
zsh-c39481cb6d172d4e77bdc1e963d13cbdbea64954.tar.xz
zsh-c39481cb6d172d4e77bdc1e963d13cbdbea64954.zip
10680: spelling corrections in _diff_options
-rw-r--r--ChangeLog3
-rw-r--r--Completion/User/_diff_options71
2 files changed, 42 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 666c05ff8..37e10eb64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2000-04-11  Clint Adams  <schizo@debian.org>
+	* 10680: Completion/User/_diff_options: spelling corrections.
+
 2000-04-11  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
 	* 10669: Completion/Core/compinstall:  will now ask for
diff --git a/Completion/User/_diff_options b/Completion/User/_diff_options
index 0ac110452..c692142fd 100644
--- a/Completion/User/_diff_options
+++ b/Completion/User/_diff_options
@@ -1,14 +1,21 @@
 #autoload
 
-local of ofwuc ouc oss ofwy ofwg ofwl
+local of ofwuc ouc oss ofwy ofwg ofwl cmd
 
-(( $+_diff_is_gnu )) || {
-	_diff_is_gnu=0;
-        [[ $(diff -v </dev/null) == *GNU* ]] && _diff_is_gnu=1
-}
+(( $+_is_gnu )) || typeset -gA _is_gnu
 
-if (( _diff_is_gnu ))
-then
+cmd="$1"
+shift
+
+if (( ! $+_is_gnu[$cmd] )); then
+  if [[ $(_call version $cmd -v </dev/null 2>/dev/null) = *GNU* ]]; then
+    _is_gnu[$cmd]=yes
+  else
+    _is_gnu[$cmd]=
+  fi
+fi
+
+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 \
@@ -50,15 +57,15 @@ then
     '(--ignore-space-change)-b[ignore changes in the amount of white space]' \
     '(-B)--ignore-blank-lines[ignore lines that are all blank]' \
     '(--ignore-blank-lines)-B[ignore lines that are all blank]' \
-    '(-I)--ignore-matching-lines=[ignore lines that match regex]:regex:' \
-    '(--ignore-matching-lines)-I[ignore lines that match regex]:regex:' \
+    '(-I)--ignore-matching-lines=[ignore lines that match regex]:line exclusion regex:' \
+    '(--ignore-matching-lines)-I[ignore lines that match regex]:line exclusion regex:' \
     '(-a)--text[treat all files as text]' \
     '(--text)-a[treat all files as text]' \
-    "($of $oss)--context=[context diff]::# lines of copied context:" \
-    "($of $oss)-C[output a context diff]:# lines of copied context:" \
+    "($of $oss)--context=[context diff]::number of lines of copied context:" \
+    "($of $oss)-C[output a context diff]:number of lines of copied context:" \
     "($of $oss)-c[output a context diff]" \
-    "($of $oss)--unified=[output a unified diff]::# lines of unified context:" \
-    "($of $oss)-U[output a unified diff]:# lines of unified context:" \
+    "($of $oss)--unified=[output a unified diff]::number of lines of unified context:" \
+    "($of $oss)-U[output a unified diff]:number of lines of unified context:" \
     "($of $oss)-u[output a unified diff]" \
     "($ofwuc $oss -L)--label[set label to use instead of file name]:label:" \
     "($ofwuc $oss --label)-L[set label to use instead of file name]:label:" \
@@ -75,18 +82,18 @@ then
     "($of $ouc $oss)-n[RCS format diff]" \
     "($of $ouc)--side-by-side[output in two columns]" \
     "($of $ouc)-y[output in two columns]" \
-    "($ofwy $ouc -W)--width[set size of line]:# characters per line:" \
-    "($ofwy $ouc --width)-W[set size of line]:# characters per line:" \
+    "($ofwy $ouc -W)--width[set size of line]:number of characters per line:" \
+    "($ofwy $ouc --width)-W[set size of line]:number of characters per line:" \
     "($ofwy $ouc)--left-column[output only left column of common lines]" \
-    "($ofwy $ouc)--suppress-common-lines[do not ouput commun lines]" \
-    "($ofwg $ouc $oss)--old-group-format=[set old group format]:group format:" \
-    "($ofwg $ouc $oss)--new-group-format=[set new group format]:group format:" \
-    "($ofwg $ouc $oss)--changed-group-format=[set changed group format]:group format:" \
-    "($ofwg $ouc $oss)--unchanged-group-format=[set unchanged group format]:group format:" \
+    "($ofwy $ouc)--suppress-common-lines[do not output common lines]" \
+    "($ofwg $ouc $oss)--old-group-format=[set old group format]:old group format:" \
+    "($ofwg $ouc $oss)--new-group-format=[set new group format]:new group format:" \
+    "($ofwg $ouc $oss)--changed-group-format=[set changed group format]:changed group format:" \
+    "($ofwg $ouc $oss)--unchanged-group-format=[set unchanged group format]:unchanged group format:" \
     "($ofwl $ouc $oss)--line-format=[set line format]:line format:" \
-    "($ofwl $ouc $oss)--old-line-format=[set old line format]:line format:" \
-    "($ofwl $ouc $oss)--new-line-format=[set new line format]:line format:" \
-    "($ofwl $ouc $oss)--changed-line-format=[set changed line format]:line format:" \
+    "($ofwl $ouc $oss)--old-line-format=[set old line format]:old line format:" \
+    "($ofwl $ouc $oss)--new-line-format=[set new line format]:new line format:" \
+    "($ofwl $ouc $oss)--changed-line-format=[set changed line format]:changed line format:" \
     '(-l)--paginate[output through pr]' \
     '(--paginate)-l[output through pr]' \
     '(-t)--expand-tabs[expand tabs to spaces]' \
@@ -101,15 +108,15 @@ then
     '(--unidirectional-new-file)-P[treat absent first files as empty]' \
     '(-s)--report-identical-files[report when two files are the same]' \
     '(--report-identical-files)-s[report when two files are the same]' \
-    '(-x)--exclude=[exclude files matching pattern]:pattern:' \
-    '(--exclude)-x[exclude files matching pattern]:pattern:' \
-    '(-X)--exclude-from=[exclude files matching pattern in file]:file:_files' \
-    '(--exclude-from)-X[exclude files matching pattern in file]:file:_files' \
-    '(-S)--starting-file=[set first file in comparison]:file:_files' \
-    '(--starting-file)-S=[set first file in comparison]:file:_files' \
-    '--horizon-lines=[set number of lines to keep in prefix and suffix]:number:' \
-    '(-d)--mininal[try to find a smaler set of changes]' \
-    '(--mininal)-d[try to find a smaler set of changes]' \
+    '(-x)--exclude=[exclude files matching pattern]:exclusion pattern:' \
+    '(--exclude)-x[exclude files matching pattern]:exclusion pattern:' \
+    '(-X)--exclude-from=[exclude files matching pattern in file]:exclude file:_files' \
+    '(--exclude-from)-X[exclude files matching pattern in file]:exclude file:_files' \
+    '(-S)--starting-file=[set first file in comparison]:start with file:_files' \
+    '(--starting-file)-S=[set first file in comparison]:start with file:_files' \
+    '--horizon-lines=[set number of lines to keep in prefix and suffix]:number of horizon lines:' \
+    '(-d)--mininal[try to find a smaller set of changes]' \
+    '(--mininal)-d[try to find a smaller set of changes]' \
     '(-H)--speed-large-files[assume large files and many small changes]' \
     '(--speed-large-files)-H[assume large files and many small changes]' \
     '(--version)-v[output version info]' \