Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
pushing output of command back into zle buffer
- X-seq: zsh-users 11426
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: pushing output of command back into zle buffer
- Date: Wed, 18 Apr 2007 03:19:41 +0200
- In-reply-to: <20070416163446.GA16374@xxxxxxxxxxxxxxx>
- Kreccount: 1
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <9fda5e550704160530p7e478483i4e8021a9e199ce23@xxxxxxxxxxxxxx> <20070416144411.GB20630@xxxxxxxxx> <9fda5e550704160803o1a26edf2oad09587d5e8b9c87@xxxxxxxxxxxxxx> <20070416155007.GA29719@xxxxxxxxx> <20070416163446.GA16374@xxxxxxxxxxxxxxx>
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