From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: umount /f/b<TAB> -> /foo/bar
Date: Sat, 20 Aug 2016 18:12:45 +0000 [thread overview]
Message-ID: <20160820181245.GA27862@fujitsu.shahaf.local2> (raw)
In-Reply-To: <160819223513.ZM1670@torch.brasslantern.com>
Bart Schaefer wrote on Fri, Aug 19, 2016 at 22:35:13 -0700:
> On Aug 19, 3:56pm, Daniel Shahaf wrote:
> }
> } + # This codepath honours any -M matchspec parameters.
> } + () {
> } + local -a tmp_buffer
> } + compadd -A tmp_buffer "$__gopts[@]" -a files
> } + matches+=( "${(@)tmp_buffer/$canpref/$origpref}" )
> } + }
> } + else
> } + # ### Ideally, this codepath would do what the 'if' above does,
> } + # ### but telling compadd to pretend the "word on the command line"
> } + # ### is ${"the word on the command line"/$origpref/$canpref}.
> } + matches+=(${${(M)files:#$canpref*}/$canpref/$origpref})
> } + fi
>
> Perhaps some variation on
>
> compadd -M "B:${(b)origpref}=${(b)canpref}" -a files
>
> ?? Some cases of mount point names containing unusual characters might
> be a little weird.
I couldn't get that to work. Neither did assigning to words[CURRENT].
I'm tempted to push the patch as is, though, since it adds matchspecs
honouring to one use-case and doesn't break others.
Thanks,
Daniel
prev parent reply other threads:[~2016-08-20 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 15:56 umount /f/b<TAB> → /foo/bar Daniel Shahaf
2016-08-20 5:35 ` umount /f/b<TAB> -> /foo/bar Bart Schaefer
2016-08-20 18:12 ` Daniel Shahaf [this message]
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=20160820181245.GA27862@fujitsu.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--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).