zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: Step two seems to take us there
Date: Sat, 20 Jun 2015 04:48:08 +0200	[thread overview]
Message-ID: <1434768488-15196-1-git-send-email-mikachu@gmail.com> (raw)
In-Reply-To: <CAHYJk3SZqG1KCRLGYPHRg+wyQ3msOKGJeuQRwn9+c65gmnQPwg@mail.gmail.com>

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


  reply	other threads:[~2015-06-20  2:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 10:32 _expand with dynamic named directories (and other issue) Mikael Magnusson
2015-06-18 11:28 ` PATCH: One small step towards making ~[foo]<tab> work Mikael Magnusson
2015-06-18 11:38   ` Mikael Magnusson
2015-06-20  2:48     ` Mikael Magnusson [this message]
2015-06-20 17:03       ` PATCH: Step two seems to take us there Peter Stephenson
2015-06-20 17:11         ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434768488-15196-1-git-send-email-mikachu@gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).