Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: directory completion bug



Peter Stephenson wrote:

> % print ~1/^D
> Completing unknown user `1'
> % print ~1
> /home/pws/src/

Oops.

Bye
 Sven

Index: Completion/Core/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_path_files,v
retrieving revision 1.8
diff -u -r1.8 _path_files
--- Completion/Core/_path_files	2000/04/17 08:04:42	1.8
+++ Completion/Core/_path_files	2000/04/18 15:08:02
@@ -170,7 +170,14 @@
     realpath="${userdirs[$linepath]%/}/"
   elif (( $+nameddirs[$linepath] )); then
     realpath="${nameddirs[$linepath]%/}/"
-  elif [[ "$linepath" = [-+][0-9]## ]]; then
+  elif [[ "$linepath" = ([-+]|)[0-9]## ]]; then
+    if [[ "$linepath" != [-+]* ]]; then
+      if [[ -o pushdminus ]]; then
+        linepath="-$linepath"
+      else
+        linepath="+$linepath"
+      fi
+    fi
     if [[ "$linepath" = -* ]]; then
       tmp=$(( $#dirstack $linepath ))
     else

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author