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

Re: Edit result of last command



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