From: Allomorphy <allomorphy@gmail.com>
To: zsh-users@zsh.org
Subject: creating a mnemonic for a history command
Date: Fri, 17 May 2024 12:03:33 +0100 [thread overview]
Message-ID: <CA+gDGNwHbKXYVZteQT7j8foEz0dAfae2i82M0Tmf8uEDHU3zwg@mail.gmail.com> (raw)
Hallowed Zshers
This is one of the most useful incantations for me:
!?foo?:%
It searches in the history for the latest command that contains the
string `foo' and returns the token (or phrase between spaces) in that
command.
Its a pain to type.
What is an elegant way to set up a mnemonic like say an alias or
something else to type
gimme(foo)
or
!@#foo
Anything that uses less of my limited clock cycles to do this.
🤓
Thanks
E
next reply other threads:[~2024-05-17 11:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 11:03 Allomorphy [this message]
2024-05-17 14:00 ` Peter Stephenson
2024-05-18 3:11 ` Bart Schaefer
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=CA+gDGNwHbKXYVZteQT7j8foEz0dAfae2i82M0Tmf8uEDHU3zwg@mail.gmail.com \
--to=allomorphy@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).