about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Core/_path_files9
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ed600dffc..763553d01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-04-18  Sven Wischnowsky  <wischnow@informatik.hu-berlin.de>
+
+	* 10812: Completion/Core/_path_files: fix completion after ~<num>
+	
 2000-04-18  Peter Stephenson  <pws@cambridgesiliconradio.com>
 
 	* 10808: Completion/Core/compinstall: handle list-prompt.
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