LWN.net Logo

Evolution of shells in Linux (developerWorks)

Evolution of shells in Linux (developerWorks)

Posted Dec 8, 2011 12:07 UTC (Thu) by nye (guest, #51576)
In reply to: Evolution of shells in Linux (developerWorks) by ncm
Parent article: Evolution of shells in Linux (developerWorks)

>Why does line-editing on a command pulled from the history, in bash, destructively edit the history?

I generally like this behaviour because it means you can go up or down in history (for reference) while editing a command line, without losing your edits in progress.

I guess you already know this, but as a workaround there's always alt+r, for 'undo all changes to this line'.

Also, there's alt+# for 'comment out this line and add it to my history', which is very useful when you've been editing a line in your history, decided you don't want to execute it now, don't want your history destructively edited, but might want to come back to it later.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds