3 ms·
I can't seem to get myself to like zsh more than bash. I eish there was a bashifier profile script. Small annoyances. A small example would be '!' To execute th
by _8j50 4y ago
I can't seem to get myself to like zsh more than bash. I eish there was a bashifier profile script. Small annoyances. A small example would be '!' To execute the last matching command, I use that all the time but zsh requires an extra enter to get it to actually run. I use it when it is a default, sometimes I use bash when it annoys too much and I would not pick it on purpose. I just don't get what is so much better about it.
- cjbprime 4y ago> execute the last matching command set +o histverify
- _8j50 4y agoThanks
- soraminazuki 4y agoAutocompletion is one thing zsh does better, and that alone is worth it IMO. It can autocomplete things other than filenames and even gives you a short description for each of the subcommands or CLI options in the completion candidates. For the most common commands, this works without even having to install third party completion scripts. Bash, in comparison, has limited completion. Most of the time, it only completes filenames even after installing third party completion scripts. It's a major source of frustration when I find myself in a bash shell. Syntax highlighting is useful as well, though that requires the use of a third party plugin. You can detect quoting errors, unmatched braces, missing commands, incorrect filepaths before hitting enter. It's indispensable in an interactive shell because that's where you write convoluted one-off one-liners. ZLE, the zsh equivalent of readline, is also a major selling point. It allows you to create your own keybinding widget, a shell function bound to a key that can manipulate the current command line buffer. It's what enables the syntax highlighting plugin. With readline, you can only assign predefined functions. In general, zsh is extensible and offers more capabilities than bash. But to feel the difference, you need to configure it and enable the nice features.
- _8j50 4y agoAutocompletion is another thing I don't like about it. The way bash does it is consistent with how other older shells did it. I can get over the weirdness but another annoyance there is having to hit the right arrow instead of tab or shift+tab. It also didn't preserve bash's builtin functions which just means I have to learn its functions but when in a bind I just fire up bash and use it instead. The popularity of bash means scripts I write will almost always be for it as well, not gonna ask others to switch to zsh to run my scripts. That said your points are very good. Like I said initially, I wish there was a script to fix all these annoyances, like a sibling comment mentioned how to fix the ! command recall.
- soraminazuki 4y agozsh's autocompletion is highly configurable, so you can probably make it behave like bash. But I guess using bash would be better if you prefer its style of autocompletion. However, you should be able to use tab key for completion by default. If it doesn't work, maybe the following command can fix it: bindkey '^I' expand-or-complete
- still_grokking 4y ago> Autocompletion is one thing zsh does better, and that alone is worth it IMO. It can autocomplete things other than filenames and even gives you a short description for each of the subcommands or CLI options in the completion candidates. For the most common commands, this works without even having to install third party completion scripts. The joke here is: All this requires additional scripts / configs. Whether bundled or not… With those scripts / config there is no difference between shells. > Syntax highlighting is useful as well, though that requires the use of a third party plugin. You can detect quoting errors, unmatched braces, missing commands, incorrect filepaths before hitting enter. It's indispensable in an interactive shell because that's where you write convoluted one-off one-liners. https://github.com/akinomyoga/ble.sh https://github.com/akinomyoga/ble.sh > In general, zsh is extensible and offers more capabilities than bash. Nobody ever could show me even one feature that isn't available in almost all popular shells! > But to feel the difference, you need to configure it and enable the nice features. Yeah sure. When you tune your ̵c̵a̵r̵ shell it has nice features afterwards… That's true for any shell as I see it. --- I for my part don't like Unix shell. Even after 20 years of usage (as since then Linux is my only OS). Also I've never understood what's the case about zsh. Nobody could ever answer the question why it's anyhow "better" or even show features not available elsewhere. I came to the conclusion that zsh is just a stupid hype of "cool kids". It's the same as with the car tuning crowd. A truly better shell would be much different than a Unix shell. There are some experiments out there but nothing really convincing. So I continue to stay with the not so cool default. As it's most compatible and available everywhere. But please wake me up when there is some real innovation regarding shells!
- StreamBright 4y agoI think the "fish way" (if we can call it like that) is better for me when you start to type the command you want to run and if you run it before it comes up as opposed to the ! way. Maybe it is only me.