zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: _expand with dynamic named directories (and other issue)
Date: Fri, 7 Nov 2014 11:32:24 +0100	[thread overview]
Message-ID: <CAHYJk3S86hsRBcLAbGdKbQtUjCw+GyHHUG+cPFoj-11sr5DNLg@mail.gmail.com> (raw)

~[foo]/<tab> with _expand in the completer style currently expands
~[foo] into whatever it expands into, and doesn't enter path
completion. It works correctly for ~/<tab> (eg, leaves the ~/ prefix
alone). Against my own better judgment I looked at _expand and found
out about keep-prefix. Setting that to 'true' indeed fixes the problem
I have, but it seems from the description that it should do what I
want when set to 'changed' as well. The code in the file doesn't make
it clear to me why the [foo] makes a difference.

The following is independent of _expand but ~[foo] tab discards the
brackets and just does named directory completion on foo, for example
expanding to ~foobar if that was a named directory. This may be
dependent on glob_complete to some degree, in that i don't get ~foobar
from ~[foo] without it set, but other weird things happen instead, for
example ~[cvids] turns into ~dl. If anything at this point, I would
either expect a / to be added or for it to expand into the full path
via _expand.

-- 
Mikael Magnusson


             reply	other threads:[~2014-11-07 10:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 10:32 Mikael Magnusson [this message]
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     ` PATCH: Step two seems to take us there Mikael Magnusson
2015-06-20 17:03       ` 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=CAHYJk3S86hsRBcLAbGdKbQtUjCw+GyHHUG+cPFoj-11sr5DNLg@mail.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).