From: Sonny Michaud <michaud.sonny@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Sundry Completion Questions ($_ $(^^) $(!!:s//)
Date: Sat, 01 Nov 2014 20:38:13 -0400 [thread overview]
Message-ID: <54557CF5.8030000@gmail.com> (raw)
Good evening!
I have a few questions regarding some different completion mechanisms in
zsh.
1) I noticed that $_<TAB> does not expand. I am wondering if other
parameter substitutions do expand and, if so, if there is an equivalent
for $_ that is similarly pithy. If not, is this something that deserves
a feature request?
2) Quick history substitution does not expand in subcommands. For
instance, the following example does nothing. I am not sure if this is
also something that would warrant a feature request.
$ touch foo
$ echo $(^touch^cat)
3) Since the above does not work, I usually use $(!!:s/foo/bar), which
has bizarre behavior, depending on whether or not a trailing slash is
provided. This one feels like a bug proper, but it may have something to
do with what I am attempting in particular.
$ grep -r foo
$ vim $(!!:s/-r/-rl)<TAB> -> vim $(grep -rl) foo
whereas
$ grep -r foo
$ vim $(!!:s/-r/-rl/)<TAB> -> $ vim $(grep -rl foo)
If anyone has any thoughts or suggestions about this, I would really
appreciate the feedback. Thanks!
- Sonny
next reply other threads:[~2014-11-02 0:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-02 0:38 Sonny Michaud [this message]
2014-11-02 2:08 ` Bart Schaefer
2014-11-02 3:09 ` Sonny Michaud
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=54557CF5.8030000@gmail.com \
--to=michaud.sonny@gmail.com \
--cc=zsh-users@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).