You are not logged in.
So I just did a new install of Arch on a new laptop, and something I noticed this time, but didn't the last two times I installed Arch, was that the live usb uses zsh. I really appreciated the "spell check" complete when I made some small mistakes on commands, normally I just use aliases to catch stuff like this, but it got me interested in zsh. I will probably be installing it when I get home later tonight but I figured i'd ask the community about their thoughts on zsh. I'm also interested in knowing any caveats that should be known, or big differences between bash and zsh. What I'm hoping for is just bash with an expanded set of tools and features, but I'm probably wrong in this.
Last edited by barefly (2016-02-02 20:35:02)
Offline
What I'm hoping for is just bash with an expanded set of tools and features, but I'm probably wrong in this.
No, you are right. Just don't go and fsck it up by installing Oh-My-Zsh...
Offline
barefly wrote:What I'm hoping for is just bash with an expanded set of tools and features, but I'm probably wrong in this.
No, you are right. Just don't go and fsck it up by installing Oh-My-Zsh...
I just found that on the AUR, holy god 180+ plugins and 120 themes?! Who needs all that?
Offline
The live ISO uses the awesome grml-zsh-config, I feel lost without it.
Para todos todo, para nosotros nada
Offline
The live ISO uses the awesome grml-zsh-config, I feel lost without it.
Thanks for the heads up! I'll likely toy around with vanilla zsh before adding anything on to it, but I really like how the Arch live environment feels so I'll likely install this soon afterwards.
Offline
I'd advice against even grml (at least for someone new to zsh). Build up your own config and learn.
Using either grml or Oh-My-Zsh is just handing of the thinking to someone else. The primary difference being that with grml it seems more likely that you are at least handing off the thinking to someone capable of it.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Using either grml or Oh-My-Zsh is just handing of the thinking to someone else.
Yes indeed, well said.
Also:
empty@Arch ~ % cat /etc/zsh/zshrc|wc -l
3700
It can take a while to parse all those lines on a slow machine
Para todos todo, para nosotros nada
Offline
The live ISO uses the awesome grml-zsh-config, I feel lost without it.
+1
Other are too complex and bloated imo. You can see my zshrc in my sig if you wish.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
It's not a drop in replacement for bash, so don't go around changing all your bash script shebangs. A lot of the builtins take different arguments, or output in a different format. But in terms of general usage (e.g. subshells, redirection, environment variable setting, piping, etc) it's basically the same as bash.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Just go through the wizard on first launch of zsh. You can also look at the zshrc files from other distributions (like Debian's).
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
It's not a drop in replacement for bash, so don't go around changing all your bash script shebangs. A lot of the builtins take different arguments, or output in a different format. But in terms of general usage (e.g. subshells, redirection, environment variable setting, piping, etc) it's basically the same as bash.
That's good to know. So the majority of my scripts should work just fine im assuming then. Is there a reason I'd ever use a shebang to point to the zsh bin file?
Offline
If you want to use features that are only available in Zsh.
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
You can write your own zsh scripts using that shebang, to take advantage of zsh features. However, Zsh is not backwards compatible with bash and not even completely POSIX, so don't expect any portability.
Offline
Switching from (ba)sh to zsh for interactive shells is definitelly worth it, mainly with oh-my-zsh. Anyway after couple of years I switched from zsh to fish (with oh-my-fish).
Last edited by satai (2016-10-01 18:02:29)
Offline
I had used fish before switching to zsh. The reason for switching: I get really annoyed by fish' 'and' for joining commands. In comparison to bash both provide amazing completion options and that alone makes it enough for me to switch. I tried grml but at one point just ripped out what I need and am now running a pure zsh. My config is available on my github repo.
Offline
zsh is awesome, grml and completions makes life so much easier
Hello Arch!
Offline
Happy zsh user here too.
I'm know using this prompt: https://github.com/sindresorhus/pure with nice, async display of git info.
Offline
I use it and like it, but I have to say, if you want to do any scripting with it... well, just don't.
The completion system is capable, but whoever thought it up should be shot and fed to whoever wrote the documentation. (Wait, which completion system? There are two, after all.) The language itself is in that weird territory most shells have, of being nearly-POSIX and having all the weirdness POSIX entails, and yet still adding its own extra weirdness (which, of course, is subtly different from every other shell for no apparent reason except to keep you on your toes). Because it's similar to other shells, all of the available documentation for zsh assumes you already know bash, or ksh, or csh, or something, so they assume you know the basics -- which would be fine if the basics were consistent from one shell to another, but nobody really bothers to consolidate that stuff. I mean, the differences between bash and ksh93 are just obvious! /s
Whatever, I need a blog. Long story short, I stick to Perl and/or Python for scripting if it's going to be more than 1 loop, but for interactive use I haven't found anything better than zsh.
Last edited by Trent (2016-03-05 02:58:50)
Offline
I've never used ZSH. To me it seems like Dvorak - a good idea but probably not worth the effort.
If you want to learn it for simply an interactive shell then sure go for it. For scripting, learn Python etc. All shell languages (csh, ksh, bash) stink for anything more than a simple script.
Offline
I've never used ZSH. To me it seems like Dvorak - a good idea but probably not worth the effort.
... All shell languages (csh, ksh, bash) stink for anything more than a simple script.
I agree on both points, though I'd temper the latter. I stick with bash, not because it is superior, but because it is perfectly adequate and a lot like a QWERTY keyboard, it will be what I have on hand on any system I'm working on. I do a fair bit of my work on remote servers, very few of which have zsh available - but they all have bash. So just like Dvorak might make me more efficient on my keyboard, it would leave me fumbling* and frustrated whenever I had to use some other system.
*edit to note: I didn't even realize I was replying to fumbles when I referred to fumbling!
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
GIven the mess I've on my desktop, using anything other then zsh's visual completion would not make any sense, including icon-based file managers. When it comes to cleaning this mess up, zsh wins hands down too.
Also, it looks beautiful with some ready-on themes.
For me, zsh changed the way I use my desktop system.
If I do something more then twice, I make a function for it in a matter of seconds. Or tag it in history with nice comment in interactive mode. Instead of clicking around, I use commands chaining all the time. ZSH makes me free from thinking about mundane stuff. Instead, there's only problem at hand and the ways to solve it.
Thanks to the fact that this shell looks so attractive and it seems so comfy, it made me interested in Vim and tiling window managers as well. It transformed me from years-long Compiz user into AwesomeWM scripter. Now I can do stuff hundreds of times both faster and better compared to what I was capable of just a few years ago.
Despite all that, I can see a point that Trilby and fumbles are making. ZSH is a perfect shell for desktop or workstation. If you're doing your work remotely, perhaps on many different systems, then sure there are some things to concider.
However, if you're installing it just for yourself at home, there's no better option, at least in my opinion.
If you had some experience with some other shells, then learning curve shouldn't be that steep at all.
http://www.amazon.com/Learning-Shell-Sc … 1783282932 << this book is pretty nice when it comes to ZSH scripting. Altough I'd rather go for Lua ( my personal fav ), or some other scripting language. As Trent and others said, ZSH is great in interactive mode, and that's kinda where you should keep it.
Offline