about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-21 09:53:40 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-21 09:53:40 +0000
commit256cde1884ee30a291b8845e4e817031ffca3e87 (patch)
tree8c26f33d173860e701e692f4af1016264f80ca49 /Completion
parente452543d92129f9b3d5aeb72b2a3846ba4589402 (diff)
downloadzsh-256cde1884ee30a291b8845e4e817031ffca3e87.tar.gz
zsh-256cde1884ee30a291b8845e4e817031ffca3e87.tar.xz
zsh-256cde1884ee30a291b8845e4e817031ffca3e87.zip
zsh-workers/9809
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Builtins/_popd4
-rw-r--r--Completion/Core/_approximate12
2 files changed, 8 insertions, 8 deletions
diff --git a/Completion/Builtins/_popd b/Completion/Builtins/_popd
index 6f0908ede..b79121139 100644
--- a/Completion/Builtins/_popd
+++ b/Completion/Builtins/_popd
@@ -9,11 +9,11 @@ setopt extendedglob nonomatch
 
 local expl list lines revlines disp
 
-_wanted -V directory-stack expl 'directory stack' || return 1
-
 ! zstyle -T ":completion:${curcontext}:directory-stack" prefix-needed ||
     [[ $PREFIX = [-+]* ]] || return 1
 
+_wanted -V directory-stack expl 'directory stack' || return 1
+
 if zstyle -T ":completion:${curcontext}:directory-stack" verbose; then
   # get the list of directories with their canonical number
   # and turn the lines into an array, removing the current directory
diff --git a/Completion/Core/_approximate b/Completion/Core/_approximate
index 6c7ae5d77..ac7b41862 100644
--- a/Completion/Core/_approximate
+++ b/Completion/Core/_approximate
@@ -23,7 +23,7 @@ zstyle -s ":completion:${curcontext}:" max-errors cfgacc || cfgacc='2 numeric'
 # Get the number of errors to accept.
 
 if [[ "$cfgacc" = *numeric* && ${NUMERIC:-1} -ne 1 ]]; then
-  # Stop if we also have a `!'.
+  # A numeric argument may mean that we should not try correction.
 
   [[ "$cfgacc" = *not-numeric* ]] && return 1
 
@@ -40,9 +40,9 @@ fi
 
 _tags corrections original
 
-# Otherwise temporarily define functions to use instead of
-# the builtins that add matches. This is used to be able
-# to stick the `(#a...)' into the right place (after an
+# Otherwise temporarily define a function to use instead of
+# the builtin that adds matches. This is used to be able
+# to stick the `(#a...)' in the right place (after an
 # ignored prefix).
 
 compadd() {
@@ -72,8 +72,8 @@ while [[ _comp_correct -le comax ]]; do
        [[ "${#compstate[unambiguous]}" -ge "${#:-$PREFIX$SUFFIX}" ]]; then
       compstate[pattern_insert]=unambiguous
     elif _requested original &&
-         ( [[ compstate[nmatches] -gt 1 ]] ||
-           zstyle -t ":completion:${curcontext}:" original ); then
+         { [[ compstate[nmatches] -gt 1 ]] ||
+           zstyle -t ":completion:${curcontext}:" original }; then
       local expl
 
       _description -V original expl original