3 ms·
> We have no need for command history. Mostly because we use better tools such as Sam and Acme to run arbitrary shell commands. Just now, I was repeatedly runn
by mercurial 13y ago
> We have no need for command history. Mostly because we use better tools such as Sam and Acme to run arbitrary shell commands.
Just now, I was repeatedly running curl in order to test an API, occasionally tweaking URL parameters here and there. Would you really open a text editor, type your curl line inside, and execute the result?
I'm not trying to be antagonistic, but I just have a hard time fathoming the idea of a shell without history.
- 4ad 13y agoBut you do have command history, it's just not in your shell, because the shell is the not right place to put it. The windowing system exposes all the history as a text file, so you can use scripts that use this text file or write your own. I already mentioned " and "" in another comment. In particular, to reexecute previous command I'd just type "". As for using text editors. Yes, in Plan 9 this is actually feasible and it's a widely used idiom. What makes it so much easier is that I can just middle-click or middle-swipe on anything inside the editor, and it would execute. So yeah, I can just type commands and edit them. When I B2 on them they will run. Please see this excellent introduction to acme by Russ Cox: http://research.swtch.com/acme http://research.swtch.com/acme
- SixSigma 13y agoI would be doing exactly that. Or rather I'd merely be right clicking on a URL and my environment would already know I wanted to retrieve that URL as text. If I was in Acme it would open that text in a new window, if in the shell it would just print it on stdout (if that's what I had set up). When I say the environment knows, actually a program called "the plumber" does text matching on the strings it is sent and executes commands based upon the pattern. I could arrange for different commands to execute based upon the URL. If I knew I was going to experiment I would be keeping a record. As Tesla said in response to Edison's now famous "1% inspiration, 99% perspiration" remark "If you thought a bit more, you wouldn't have to sweat so much." (both were in a live radio debate, curiously only Edison's has entered the lexicon)
- pierrebai 13y agoThe problem is that both your attitude and 4ad reflect a somewhat toxik high-priest holier-than-you. For example, someone enquiring about using arrow for history navigation gets an immediate response about how bash is an abimination and a rant about no-one having written a new shell in 20 years and what not. Meanwhile, skipping entirely any discussion about how plan 9 does things better. 4ad mentioned " but failed to explain how one navgates /down/ the history. It also entirely ignores the fact that users have voted and arrows have won. They are used to navigate in text. Navigate between email messages. Practically every where keyboard-based navigation is used, arrow leys have proved both accessible, simple to understand and fast to use for the level-1 needs (next, previous, ...). Are your rants enlightening? no. They merely impress that plan 9 is not a community I'd like to join.