about summary refs log tree commit diff
path: root/Completion/Unix/Type
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2001-07-13 12:30:20 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2001-07-13 12:30:20 +0000
commited914f48f36eac575e024abe75290243f8fe223e (patch)
tree1889c68f54576d3c3532987bf36cf1e9d074612e /Completion/Unix/Type
parent45051d58ab773ebd65f1ec07e58d1b43587d1a4f (diff)
downloadzsh-ed914f48f36eac575e024abe75290243f8fe223e.tar.gz
zsh-ed914f48f36eac575e024abe75290243f8fe223e.tar.xz
zsh-ed914f48f36eac575e024abe75290243f8fe223e.zip
15390: Cygwin support
Diffstat (limited to 'Completion/Unix/Type')
-rw-r--r--Completion/Unix/Type/_path_files10
1 files changed, 9 insertions, 1 deletions
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 0e1f9fe3f..1bf91caf2 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -268,7 +268,15 @@ else
   linepath=
   realpath=
 
-  if [[ "$pre[1]" = / ]]; then
+  if zstyle -s ":completion:${curcontext}:" preserve-prefix tmp1 &&
+     [[ -n "$tmp1" && "$pre" = (#b)(${~tmp1})* ]]; then
+
+    pre="$pre[${#match[1]}+1,-1]"
+    orig="$orig[${#match[1]}+1,-1]"
+    donepath="$match[1]"
+    prepaths=( '' )
+
+  elif [[ "$pre[1]" = / ]]; then
     # If it is a absolute path name, we remove the first slash and put it in
     # `donepath' meaning that we treat it as the path that was already handled.
     # Also, we don't use the paths from `-W'.