Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: history puzzle



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@xxxxxxxxx>


On Tue, Jun 4, 2024 at 14:01 Ray Andrews <rayandrews@xxxxxxxxxxx> 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. 



Messages sorted by: Reverse Date, Date, Thread, Author