Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Edit result of last command
- X-seq: zsh-users 8254
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Edit result of last command
- Date: Tue, 30 Nov 2004 17:33:50 +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <j7toq0hhu6ldk794e0784rqo1h3oipmcud@xxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Bart,
Found it at mla
function keep()
{
kept=()
kept=( $~* )
if [[ ! -t 0 ]]; then
while read line; do
kept+=( $line )
done
fi
print -Rc - $kept
}
alias keep='noglob keep '
# use example (but also could be a real complex pipe)
ls [a-c]*.php | keep
# same as
keep [a-c]*.php
# $kept now contains your list of files or whatever for later use
vi $kept
Thanx I will be wearing out this baby!!
I can see me having functions keep1..keep9
zzapper (vim, cygwin, wiki & zsh)
--
vim -c ":%s%s*%CyrnfrTfcbafbeROenzSZbbyranne%|:%s)[R-T]) )Ig|:norm G1VGg?"
http://www.vim.org/tips/tip.php?tip_id=305 Best of Vim Tips
Messages sorted by:
Reverse Date,
Date,
Thread,
Author