about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-09-03 14:07:25 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-09-03 14:07:25 +0000
commit688f8b421244e4efaa6a6def242b2fa0bf5b74c5 (patch)
tree2d1395f87d651d80ea5c286f05e35bf1eefb226c
parent4284171e9e15960996e0d77d11fde1e741145c16 (diff)
downloadzsh-688f8b421244e4efaa6a6def242b2fa0bf5b74c5.tar.gz
zsh-688f8b421244e4efaa6a6def242b2fa0bf5b74c5.tar.xz
zsh-688f8b421244e4efaa6a6def242b2fa0bf5b74c5.zip
19021: in command position, try to complete directories once and once only
-rw-r--r--ChangeLog9
-rw-r--r--Completion/Zsh/Command/_cd5
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 762b77507..fb3557754 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-09-03  Oliver Kiddle  <opk@zsh.org>
+
+	* 19021: Completion/Zsh/Command/_cd: in command position,
+	try to complete directories once and once only
+
+	* 19019: Completion/Zsh/Command/_alias,
+	Completion/Zsh/Command/_unhash: only complete aliases of the
+	appropriate type for the alias builtin
+
 2003-09-03  Peter Stephenson  <pws@csr.com>
 
 	* 19020: Src/hashtable.c: printaliasnode was screwed up by 19014.
diff --git a/Completion/Zsh/Command/_cd b/Completion/Zsh/Command/_cd
index 306855bc8..3c19f82da 100644
--- a/Completion/Zsh/Command/_cd
+++ b/Completion/Zsh/Command/_cd
@@ -67,14 +67,15 @@ else
     # Don't complete local directories in command position, that's
     # already handled by _command_names (see _autocd)
 
-    [[ CURRENT -ne 1 ]] &&
+    [[ CURRENT -ne 1 || ( -z "$path[(r).]" && $PREFIX != */* ) ]] &&
         alt=( "${cdpath+local-}directories:${cdpath+local }directory:_path_files -/" "$alt[@]" )
 
     _alternative "$alt[@]" && ret=0
 
     return ret
   fi
-  _wanted directories expl directory _path_files -/ && ret=0
+  [[ CURRENT -ne 1 ]] && _wanted directories expl directory \
+      _path_files -/ && ret=0
 
   return ret
 fi