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

PATCH: Step two seems to take us there



This change on top of the previous one seems to make things work when
the foo in ~[foo] has a / in it. I'm not sick enough to try and make a \]
in there work.

Incidentally, it would be nice if the mail archive would include the
message-id so you can pass it to git-send-email's --in-reply-to without
looking it up in your own mail client. It does show the message-id for
the message it replies to, which seems less useful.

---
 Completion/Unix/Type/_path_files | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index f51db4a..3a0ae43 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -321,8 +321,8 @@ elif [[ "$pre[1]" = \~ && -z "$compstate[quote]" ]]; then
   fi
   linepath="~${linepath}/"
   [[ "$realpath" = "$linepath" ]] && return 1
-  pre="${pre#*/}"
-  orig="${orig#*/}"
+  pre="${${pre#\~\[[^]]#]}#*/}"
+  orig="${${orig#\~\[[^]]#]}#*/}"
   donepath=
   prepaths=( '' )
 else
-- 
2.4.0



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