Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Better way to execute commands from history?
- X-seq: zsh-users 14332
- From: sam reckoner <sam.reckoner@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Better way to execute commands from history?
- Date: Wed, 2 Sep 2009 12:54:04 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=b5d8XRz99+46i4NUEvl/3pviD8xeW+k+vt6w6JMCwmU=; b=sFKCR0yyC/l7gtr9BV+dT/ZiEhRpYyuljwMfU8w/8RuHZsHqT2jC5b/3VfJF3nuHSV uO4QqzmwEGpNGVlXMSDibiCR2Bij+d8A6FrA12BKn4uvjr8qWwStld3x2SENUhCHa6g9 pw+bZxM+7ty167gv84I7J6qdiuyTjlUYonvv8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=hWIwwF+ymjLK+jRfRTpM8gbYQcksu4uwRhoAFjxvjHOctaRehi60jVR1t5hTZxwu1c mzk3KFCbccrDtGwzmTgXIIs1xqnNsHC/BXWpev3Xdb6JdJzOyjBwQJ7RbWAi4Vvn5dVD MReOPw+nqWE9E7b6Ot7phSuBjzYjf3IdEpDz4=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi,
I am in the habit of doing the following:
% fc -l -1000| grep -i cd | grep -i link | tail -1 | cut -d" " -f3
which gives me the number of the command that contains both "cd" and
"link" in it. I then manually type in
% !num
where num is the output of the first command. I know there is a C-R
command, but doing it as above makes it possible to search the entire
string in the history list for multiple items.
I'm sure there's a better way to do this.
Any help appreciated.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author