Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Tip of the day: previous command output
- X-seq: zsh-users 7957
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Tip of the day: previous command output
- Date: Tue, 31 Aug 2004 16:03:06 +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040819085812.GL22962@localhost>
- Sender: news <news@xxxxxxxxxxxxx>
On Thu, 19 Aug 2004 10:58:12 +0200, wrote:
>Someone asked for zsh tips a couple of weeks ago. Here's something I use
>a lot. I got the basic idea from some user group somewhere, and then I've
>tweaked the idea to suit my needs.
>
>The motivation for the following snippet is the fact that I often do a 'find'
>or a 'locate' to find some files I'm interested in, and then want to do some
>action on one of the files I just found. This function provides a way to put
>completions from the output of the previous command on the command line.
>
>_jh-prev-result () {
> hstring=$(eval `fc -l -n -1`)
> set -A hlist ${(@s/
>/)hstring}
> compadd - ${hlist}
>}
>
>zle -C jh-prev-comp menu-complete _jh-prev-result
>bindkey '\ee' jh-prev-comp
>
Anyone care to do a summary of this thread? Not being lazy I hope, but there's some quite advanced
stuff!
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