about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-18 15:09:40 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-18 15:09:40 +0000
commit44ee911749a56a1320e6f415d4c4da46d73bb884 (patch)
tree7a660cf3447231a88d008da36e1f625dfa17bc87 /Completion/Core
parent9941ddd984c479bcb649f89ce62f282c0f9e6e64 (diff)
downloadzsh-44ee911749a56a1320e6f415d4c4da46d73bb884.tar.gz
zsh-44ee911749a56a1320e6f415d4c4da46d73bb884.tar.xz
zsh-44ee911749a56a1320e6f415d4c4da46d73bb884.zip
fix completion after ~<num> (10812)
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_path_files9
1 files changed, 8 insertions, 1 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 1744c280b..10fe39869 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -170,7 +170,14 @@ if [[ "$pre[1]" = \~ ]]; then
     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