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

Re: Tip of the day: previous command output



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