Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Posted Dec 8, 2011 5:47 UTC (Thu) by imgx64 (guest, #78590)Parent article: Evolution of shells in Linux (developerWorks)
I'm glad this is less true these days; most people just use Bash because it's the default on their distribution and never think about it. I wasted too much time thinking about editors and trying different ones until I settled on Vim. I do not want to repeat that for shells.
Although to be honest, I did contemplate ZSH at one point, and I liked many of its features. The ones that stand out the most are the autocomplete (for example, autocomplete for umount only shows mounted devices), and ZLE (the line editor, I wish Bash/Readline could edit multi-line history as easily).
But then, the good is the enemy of the perfect (apologies to Voltaire), so I decided that Bash is good enough, and that switching and learning all these new features is not worth my time.
Posted Dec 8, 2011 6:47 UTC (Thu)
by lindahl (guest, #15266)
[Link] (12 responses)
complete -A hostname ssh ping traceroute mtr
It doesn't seem to have an 'action' for mounted filesystems.
Still, I have to finish by mentioning that you should definitely switch to emacs :-)
Posted Dec 8, 2011 7:24 UTC (Thu)
by wahern (subscriber, #37304)
[Link] (5 responses)
Posted Dec 8, 2011 8:42 UTC (Thu)
by thedevil (guest, #32913)
[Link] (2 responses)
Posted Dec 8, 2011 9:31 UTC (Thu)
by HelloWorld (guest, #56129)
[Link] (1 responses)
Posted Dec 8, 2011 18:33 UTC (Thu)
by clump (subscriber, #27801)
[Link]
Posted Dec 8, 2011 10:26 UTC (Thu)
by imgx64 (guest, #78590)
[Link]
But then again, I don't think you'll really "use bash when bash learns RPROMPT", simply because there is no reason to use Bash if you're happy with Zsh[1].
[1] I don't want to start a shell wars thread, but I'm curious if Bash has any advantages over Zsh other than ubiquity and the user being familiar with Readline (has a customized .inputrc for example).
Posted Dec 8, 2011 14:42 UTC (Thu)
by nix (subscriber, #2304)
[Link]
Posted Dec 8, 2011 14:40 UTC (Thu)
by nix (subscriber, #2304)
[Link] (5 responses)
(But it is seriously awesome despite the ridiculous overdesign.)
Posted Dec 8, 2011 14:50 UTC (Thu)
by nye (subscriber, #51576)
[Link] (1 responses)
Can you give an example of the kind of autocompletion that can be done in zsh but not in bash?
Posted Dec 8, 2011 16:44 UTC (Thu)
by nix (subscriber, #2304)
[Link]
bash has nothing remotely comparable.
It is *crazy* flexible, so flexible that there is an autoloaded 'compinit' function just so that normal mortals stand a chance of configuring its *default* setup. (This is the 'zshcompsys' completion system, btw, not the 'zshcompctl' system, which is akin to bash's, and is obsolete.)
Posted Dec 8, 2011 15:48 UTC (Thu)
by joey (guest, #328)
[Link] (1 responses)
Posted Dec 14, 2011 0:01 UTC (Wed)
by tertium (guest, #56169)
[Link]
Posted Dec 8, 2011 23:34 UTC (Thu)
by nevyn (guest, #33129)
[Link]
That's probably at least 50% of the reason I still use zsh, the other 90% being that I configured zsh like 16 years ago and am happy to not have to configure bash when "yum install zsh" works instead :).
Posted Dec 8, 2011 6:56 UTC (Thu)
by geuder (subscriber, #62854)
[Link] (1 responses)
autocomplete behaviour is not really built-in or more exactly the built-in default behaviour is not suitable for many commands, e.g. umount. Bash does offer an API for everybody (i. e. every command) to get customized autocomplete behaviour.
I have always wondered why there are so many commands that do not install suitable autocompletion scripts for bash. But hey, it's open source. Maybe we should comment less and code more... Contributing those scripts might be more laborous than writing them, though. They don't just belong to bash but you have to work with every command's upstream.
Posted Dec 8, 2011 14:43 UTC (Thu)
by nix (subscriber, #2304)
[Link]
Posted Dec 8, 2011 8:28 UTC (Thu)
by rvfh (guest, #31018)
[Link]
Ubuntu does that for me :-) Just checked on 10.04 at work.
Posted Dec 8, 2011 10:13 UTC (Thu)
by fb (guest, #53265)
[Link]
At multiple moments in the 90s and early 00s, I got so annoyed with tcsh (or the lack of it pre-installed in many places where I had no su-powers) that I tried to switch to bash. Every time I got so annoyed that I remained with tcsh as my main shell.
IIRC bash had hard limitations at what I could do in a prompt (short of running an embedded command), and at the time it had no completion.
After learning about ZSH, I lived happy ever after. (Note that I learned about it from a friend talking about a shell at which I could play Tetris.)
But you are right about 'good enough', there is a time in life where you can afford to be playing around with different shells, editors etc; later the cost and benefit of migration just don't make sense.
[...]
FWIW, ZSH 4.3.13 was released yesterday.
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
What part about "right-hand prompt" and "no approximations" did you not understand?
Not helpful. There are many ways to have the prompt echo the current working directory. One such way is to use a right hand prompt in zsh, there are others as well. No need to attack people for mentioning that.
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
RPROMPT is nice too though ;).
Evolution of shells in Linux (developerWorks)
> autocomplete for umount only shows mounted devices),
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)
Evolution of shells in Linux (developerWorks)