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

pushing output of command back into zle buffer



Hi Stéphane,

> edit-command-output() {
>   local output
>   output=$(eval $BUFFER) || return
>   BUFFER=$output
>   CURSOR=0
> }
> zle -N edit-command-output
> bindkey '\e!' edit-command-output

Great!  Even undo works after executing the command.  Perfect!
Thanks,
 Andy.

-- 
 The competent programmer is fully aware of the strictly limited size of his own
 skull; therefore he approaches the programming task in full humility, and among
 other things he avoids clever tricks like the plague. 
   (Edsger Wybe Dijkstra, The Humble Programmer)



Messages sorted by: Reverse Date, Date, Thread, Author