bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: edit-and-execute-command; minus the "execute" part?


From: Dabrien 'Dabe' Murphy
Subject: Re: edit-and-execute-command; minus the "execute" part?
Date: Tue, 31 Aug 2010 16:26:50 -0400
User-agent: Postbox 1.1.5 (Macintosh/20100613)

On Tue, 24 Aug 2010, Dennis Williamson wrote:
On 8/23/10 3:17 PM, Dabrien 'Dabe' Murphy wrote:
I'd prefer it if, after exiting my $EDITOR, bash simply stuffed the results back into my readline buffer. Particularly, if I decide to abandon my changes, I find it worrisome that the shell goes ahead and executes the previous command anyway. (I guess I've grown accustomed to SVN's behavior, for example, where if you don't make any changes to your commit message, it gives you the option to abort the entire transaction.)

One workaround would be to bind the keystroke to a macro that inserts a comment character at the beginning of the line before doing edit-and-execute-command. Then when you exit the editor the comment will be "executed" then you can press up arrow to retrieve the line and delete the comment character and do further editing then execute it.

"Clever."

It's not /exactly/ what I had in mind, but it certainly addresses the issue at hand... (Thus making it, like you say, a "workaround", hehe.)

Thanks, Dennis!

--
:- Dabe

--
:- *Dabrien "Dabe" Murphy*
:- /Sr. Solutions Engineer/
:- /Linux / Unix / Mac / Perl/
--
:- /Swing Dance DJ & Instruction/
:- /Jitterbug, Lindy Hop, Big Band and More!
/--
:- www.Dabe.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]