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

Re: Edit result of last command



On Mon, 29 Nov 2004 12:02:11 -0800 (PST),  wrote:

>On Mon, 29 Nov 2004, zzapper wrote:
>
>> say I've done a command a find/ls whatever
>[...]
>> This does the trick, but how would you zedii do it?
>
>Don't you remember the "Tip of the day: previous command output" thread 
>from back in August?

Sorry Bart, I got overloaded at that time!

>
>  keep *add*
>  vi $kept
>
>or
>
>  find . -name '*add*' -print | keep
>  vi $kept
>
>or any one of several completion-based variants also in that thread.
>
>I also have this pair of keybindings:
>
>  bindkey "^[f" forward-word
>  bindkey -s "^[v" '^E)^Avi $(^[f"
>
>which means I scroll back in the history to the command I want to capture
>
>  ls *add*
>
>then type esc-v and end up with
>
>  vi $(ls *add*)
>         ^
>with the cursor here, so I can modify the options (add -l to grep, or 
>remove -l from ls, etc.).

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