From: "Mark J. Reed" <markjreed@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: history puzzle
Date: Tue, 4 Jun 2024 14:12:28 -0400 [thread overview]
Message-ID: <CAA=-s3y-O9A7sahUbKPfjOef8s71kbz8QT8PVPHLUKUUWAFixg@mail.gmail.com> (raw)
In-Reply-To: <32c690d4-fe7f-4d89-ac99-829fa64cca15@eastlink.ca>
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
What's "history -m"? Doesn't that just look for items in the history
containing "-m"?
"Word" sounds like you're reading about expansions, as in:
!! - most recent command
!!:$ - last word of most recent command
!!:^ - same as :1, first argument word of most recent command
!!:0 - just the command name of most recent command
Mark J. Reed <markjreed@gmail.com>
On Tue, Jun 4, 2024 at 14:01 Ray Andrews <rayandrews@eastlink.ca> wrote:
> Trying to do fancier things with history I'm clearly not understanding
> something. Doc says '^' is first word in a history entry and '$' is the
> last. But:
>
> % history -m "^" 1 # Shows everything
> % history -m "^nosuchstring" 1 # Also shows everything
> % history -m "$" 1 # Shows nothing
>
> ... so I'm obviously missing something.
>
>
[-- Attachment #2: Type: text/html, Size: 2150 bytes --]
next prev parent reply other threads:[~2024-06-04 18:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 18:00 Ray Andrews
2024-06-04 18:12 ` Mark J. Reed [this message]
2024-06-04 19:28 ` Lawrence Velázquez
2024-06-04 19:52 ` Ray Andrews
2024-06-04 20:18 ` Lawrence Velázquez
2024-06-04 19:49 ` Ray Andrews
2024-06-04 20:19 ` Lawrence Velázquez
2024-06-04 20:37 ` Mark J. Reed
2024-06-04 23:51 ` Ray Andrews
2024-06-04 23:48 ` Ray Andrews
2024-06-05 0:33 ` Lawrence Velázquez
2024-06-05 2:00 ` Ray Andrews
2024-06-05 15:53 ` Mark J. Reed
2024-06-05 16:13 ` Ray Andrews
2024-06-04 18:54 ` Kannan Varadhan
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='CAA=-s3y-O9A7sahUbKPfjOef8s71kbz8QT8PVPHLUKUUWAFixg@mail.gmail.com' \
--to=markjreed@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).