5 ms·
I am still afraid to switch from Bash to Zsh, because these are things I don't fully understand and will find it hard to debug if _something_ breaks. Is someth
by orsenthil 4y ago
I am still afraid to switch from Bash to Zsh, because these are things I don't fully understand and will find it hard to debug if _something_ breaks.
Is something like this available for bash?
- dmd 4y agoIt's puzzling to me that people still think of zsh as "that newfangled shell I'm not sure about yet". Bash came out in 1989. Zsh came out in 1990.
- __del__ 4y agoi use zsh, but i often invoke bash just to make sure some behavior is "normal" rather than zsh-specific, or specific to how i wrote my .zshrc last decade [and haven't changed]. i don't think it's about the newfangledness; i think it's about the potential for subtle differences in syntax which scare people away from zsh.
- Beltalowda 4y agoI think the initial setup can be quite daunting; unlike bash, which never seemed to have moved beyond 1990, zsh added a lot of features, many of which are very useful (some of which less so, like csh-compatibility things) but there's a lot of it, and the defaults are somewhat bare-bones. Hence things like oh-my-zsh, which is quite intimidating in its own way. The fish shell "fixed" a lot of that by adding more or less the same feature-set as zsh but without the extensive configurability, which is a really great trade-off if the fish defaults work well for you (they don't for me personally though).
- monkpit 4y agoWrite your scripts using bash or sh in the hashbang and use zsh for your daily work. Also, use shellcheck.
- chasil 4y agoIt is useful to try your scripts in a POSIX shell that avoids non-standard extensions. The best known is the Debian dash reroll of the Almquist shell, but there are other implementations (I've heard of mrsh and gsh, and the one in OCaml). POSIX shells do not support arrays, and many other common bash extensions. However, dash is very small, and very fast (4x faster than bash according to some sources). Scripts written for the POSIX shell are maximally-portable.
- Bayart 4y agoI use Zsh for CLI and Bash for scripting. Never ran into any problem, production-wise.