about summary refs log tree commit diff
path: root/Completion/Core/_path_files
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:21:49 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:21:49 +0000
commit640a840d2e94f0fc245ef8632050c37af23c6b94 (patch)
treebc0835572657666fe6d27cb73ea8a716e683925a /Completion/Core/_path_files
parent04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8 (diff)
downloadzsh-640a840d2e94f0fc245ef8632050c37af23c6b94.tar.gz
zsh-640a840d2e94f0fc245ef8632050c37af23c6b94.tar.xz
zsh-640a840d2e94f0fc245ef8632050c37af23c6b94.zip
zsh-3.1.5-pws-13 zsh-3.1.5-pws-13
Diffstat (limited to 'Completion/Core/_path_files')
-rw-r--r--Completion/Core/_path_files3
1 files changed, 2 insertions, 1 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 535ba537c..4c61ac7ef 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -111,7 +111,7 @@ orig="${PREFIX}${SUFFIX}"
 
 [[ $compstate[insert] = *menu || -n "$_comp_correct" ||
    ( $#compstate[pattern_match] -ne 0 &&
-     "$orig" != "${orig:q}" ) ]] && menu=yes
+     "${orig#\~}" != "${${orig#\~}:q}" ) ]] && menu=yes
 
 
 # We will first try normal completion called with `compgen', but only if we
@@ -405,6 +405,7 @@ for prepath in "$prepaths[@]"; do
     # No match, insert the expanded path and add the original tail.
 
     [[ "$testpath[-1]" = / ]] && testpath="$testpath[1,-2]"
+    [[ -z "$testpath" && "$linepath[-1]" = / ]] && linepath="$linepath[1,-2]"
     [[ -n "$ostr" && -n "$linepath$testpath" ]] && ostr="/$ostr"
 
     # But only if something changed.