Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Wildcard history search
- X-seq: zsh-users 13270
- From: "Slim Joe" <slimjoe2k8@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Wildcard history search
- Date: Sun, 21 Sep 2008 11:25:08 +0900
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=YI0CIKTdRZTKQLn3qYvVXCSmPbM1Y4mcGtIg0Elja1U=; b=ZfNRiywjZMwskBEquzcpHJUt0JzyqOfTkko/GpH+8K8oQITrGYGlDUVEs3lvALjclA rAdaYJQUXK/iAtUWEAWGqdWW4juFU1jZ7tgZnahw/mdg2t3knRPZ7B79iAyC7p3InaR2 fHBwzo9zubnkpAM0LQOAraVYyUERoCWcBCOWc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Qt4N7sAAyc9Gfgdb+04f/CAzVNrQO4Z+FA81ZhNlakfMWLpPZTyO0NHrjekGyLwWKJ X3knZl25F4cZ2AlOR+0TsyQPJZyzqc3kngQVSfzfi2ICanYMOBPqONOmITTa0WF0JRna 2VOhtR4aguHlHr152QJrGaA5IKXxs9by/7218=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
I'm just wondering if zsh has a tcsh feature that I find very
convenient. It's the ability to search the history list using
wildcards. For example, I have issued the following commands:
[107] echo brown is the fox
brown is the fox
[108] echo the fox is brown
the fox is brown
In order to match [107] without going through [108], I only need to type:
[109] *x<Meta-P>
The "*x" will match the command containing the terminal word "fox"
[107] and not [108] which contains the word "fox" in the middle. To
explicitly match [108], I type "*n<Meta-P>", that is *{brow}n
Fancier combinations can exist like "??ho*<Meta-P>" which will match
{ec}ho{*} or "*{brown,fox}<Meta-P>" to math all commands the end with
either "brown" or "fox".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author