5 ms·
No zsh? I've attempted to try zsh a couple of times, but both times I was daunted by the sheer number of config questions asked by the set-up tool (may have bee
by dghf 10y ago
No zsh? I've attempted to try zsh a couple of times, but both times I was daunted by the sheer number of config questions asked by the set-up tool (may have been Oh-My-Zsh, can't remember), questions to which my only answer could be "I don't know, the first one I guess?"
I was hoping to find some good reasons why I should (or shouldn't) use it over bash.
- guard-of-terra 10y agoIt has really good completion, including path completion. It has virtually infinite shared history. You can do some powerful customizations. bash is trying to catch up in many areas but not quite there. Having said that, I've now switched to fish which I don't like but it doesn't need configuring.
- Zardoz84 10y agoBah.... Use Fish
- guard-of-terra 10y agoI'm pretty sure it's possible to configure fish, but I don't feel any need to. That's the good part - works out of box. However I don't like their new shell syntax, especially env vars handling. Doubt it's configurable.
- shakna 10y agoOne of the deep concepts of fish is that everything is a function. So while you can't do "PATH=$PATH", you could easily make a function that parses that for you, and have "env PATH=$PATH". It's a limitation. However, it does mean that instead of something like Bash's insanity around P1 when you want a contextual prompt, fish_prompt is a function, with all the beauty of ifs, fors, and whiles spread out in an easy to read language. Fish can be hit or miss, but it feels like Lua for the shell, to me.
- wtbob 10y agoMeh, fish seems to be gratuitously incompatible with sh/bash/zsh. In my experience it seems to be preferred by the sort of person who uses macOS and doesn't use vi or emacs.
- qznc 10y agoI use and love fish, but zsh completion is more powerful.
- zeveb 10y ago> Having said that, I've now switched to fish which I don't like but it doesn't need configuring. That's a plus, but I really don't like how unlike the standard shells fish is. That's not entirely a bad thing (c.f. eshell, which is an interesting experiment), but also not a good thing (c.f. eshell, which is AFAICT unusable). Another issue I have with fish is its popularity. eshell isn't popular, and so eshellisms don't tend to creep into shared environments; fish is popular, and more and more fishisms are creeping into the world at large. This is not, I think, a good thing at all. If you're putting shell examples out into the world, they should be POSIX-compatible, or at the very least an extension of POSIX; they shouldn't be some wonky other language (else why use shell at all; use a better language altogether, which fish isn't). I'd really like to see a good reason to use fish over zsh or bash.
- hibbelig 10y agoIn my eyes, the "size of the delta" between, say, fish and bash, is similar to that between, say, Perl and PHP. Or C# and Java. So I feel it's justified to say that fish is a different language than POSIX shell.
- ufo 10y agoOne of the compatibility breaks that I love about fish is that you can use unquoted variable expansion without needing to worry about it being broken on whitespace set foo "Hello World" count $foo # gives 1
- coldtea 10y ago>If you're putting shell examples out into the world, they should be POSIX-compatible, or at the very least an extension of POSIX; If you want to be constrained by POSIX (as we will all be for the next 100 years or so), there are literally myriads of shells you can use.
- the_duke 10y agoI switched to zsh a couple of months ago, with oh-my-zsh. Just ignore the "i dont know" questions. The defaults all work well. The improvements of zsh over bash are all rather small. And a lot can be achieved by configuring bash heavily. But they all add up to give a nice producivity boost. What I like (some of those come from oh-my-zsh rather then zsh): * way better autocompletion * directory stacks (love em) * way better behaviour for rm / rm -r (confirm prompts, etc) * small but nice: if output of a program lacks a \n at the end, it is inserted (with a visual marker) * ".." or "..." for going up the directory tree, without "cd" * from oh-my: great aliases for git (git add - ga, git
- Esau 10y agoZsh is listed in figure one.