joy of command history
Geek
Millions of programmers use a graphical tool like an IDE when programming - things that all basically boil down to a text editor with some smarts built in. From time to time I try them out, but I always end up coming back to a terminal window and Emacs. Why? It just occured to me: bash's command history. There are a few very specific properties that make the command history the killer feature, the lack of which will keep me away from graphical development environments for a long time to come.
First off, bash has Emacs-style history searching. If I want to run the same frob command that I ran earlier today, I type C-R frob, then keep hitting C-R to search back through each matching command. Programming is a very reptitive task. There a cycles within cycles within cycles and being able to very quickly and easily recall some command issued hours or days ago makes life so much easier.
Second, as I do everything other than editing text in the terminal window, the command history is a complete history of stuff I have done. Recompile... run the app... open that file... run the debugger... commit code changes.. export or deploy or whatever. It's all there and whatever it was I can do it again with a quick bang (!) or search. So nice!
Third, bash can be configured to merge your command history from multiple terminals, so you don't lose any of it if you open more than one terminal at a time - I generally have several. This means that everything I have done for the last week or two (my history is only 500 entries long, but that seems to be good enough) is available in an instant.
Now, other shells may have some some or all of these properties too, but tcsh sure as hell doesn't (/me waives at work) and neither does any IDE that I know of. So sure enough, I hate using them, they slow me down, force me to think about things I really don't care about and generally suck.
Interestingly, many graphical applications do have a command history - albeit an exceptionally useless one because the only way you can get to it is using Undo/Redo. What would be interesting is an IDE that implements bash-like access to the undo/redo history. It would still suffer from the GUI overhead and lack an equivalent for things like file name completion, but if it has some other great features, it might just win me over.
Comments
Good God, man. Emacs?!
Posted by: Dave Hill on May 19, 2006 02:28 AM
Yeah, what else would it use?
Posted by: Mike on May 19, 2006 11:38 AM
It? Bash? Oh, emacs key bindings in Bash are fine.
Posted by: Dave Hill on May 19, 2006 06:49 PM
So you are objecting to Emacs using Emacs keybindings then?
Posted by: Mike on May 20, 2006 01:15 PM
Sure, why not? :)
Posted by: Dave Hill on May 20, 2006 05:12 PM
It's people like you wot cause unrest.
Posted by: Mike on May 20, 2006 06:09 PM
Unrest/Rerest.
Unrest/Rerest.
(Back on-topic for just the tiniest smidge, I swear, I am actually attempting to use an IDE for the first time in a few years. I do this periodically, because even the Smart People around me seem to use a certain IDE for Java at least, but it hasn't worked yet.)
Posted by: Joel on May 22, 2006 09:18 PM
Day two of Joel vs the IDE.
We have been forced to eat the sled dogs, and the sherpas are looking nervous. This sucks, and not in a good way. The simple jobs aren't quite simple enough, and because it's one of those massively-open-source type things, hyper-pluggable and really really fun to write tools for, everyone has gone rushing off writing nifty things (like UML tools that will model your code - then start modifying* it without you asking it to when you tweak the diagram) and nobody has been making sure that the basic tasks are painless.
I see all the GUI toys people are playing with, and have to admit it's all pretty cool, but I honestly think it's time that could be better spent making sure their code wasn't total pants.
(*For values of "modify" occasionally equal to "delete")
Posted by: Joel on May 23, 2006 06:21 PM
But surely it also assimilates a VCS (but probably not the one you want to use), so you can just click to revert your changes?
You are using Eclipse, yeah? I wonder at what point the IDEs out there will basically become interchangable, because all the useful functionality will be in plugins? At that point, perference for one over the other will just become a matter of deciding which custom window-panel-docking-widgets you prefer. Those things seem to be the real killer feature of most IDEs. It a shame they all need ten open window panes too many to do anything useful.
Got any good recipes for sled dogs?
Posted by: Mike on May 23, 2006 10:29 PM
Yeah, what you said.
I've given up again and gone back to XEmacs (sort of unsatisfactory though it is), but the Sherpas are now plotting against me in their sinister language, out beyond the circle of firelight. (Yes, I was talking about Eclipse, but only because it's the nearest representative of its people.)
I really want an IDE. I just can't find one I don't hate.
(You wanna know something really, terribly sad? The best IDE I have used was MS Visual C++, about eight or nine years ago. Pity the standard library didn't work properly or it woulda been great.)
Posted by: Joel on May 24, 2006 08:13 PM
Yeah, people seem to like MS's IDEs - too bad they are non-free.
But really, XEmacs?! Are you some sort of JWZ fanboy? Oh, wait, you've switched to a Mac as well! Guilty as charged, I think.
Posted by: Mike on May 26, 2006 01:51 PM
Oh, fuck you funny man!
JWZ had his moments back in the 90s I guess. But actually, I use XEmacs for the entirely logical reason that it had meta-x goto-line bound to a key out of the box when I was choosing an Emacs flavour, way back in my formative years.
Posted by: Joel on May 26, 2006 07:16 PM
Are you some sort of RMS fanboy, Mike?
Posted by: Dave Hill on May 26, 2006 08:25 PM
So your .(x)emacs is empty then? I don't think so buddy!
RMS p0wn j00!
Posted by: Mike on May 26, 2006 09:21 PM
Add a Comment