6 ms·
I moved from bash => zsh => fish. I wanted reasonable features on my shell, and fish was much faster and needed almost no plugins. The fact that I can write a
by dietr1ch 5y ago
I moved from bash => zsh => fish. I wanted reasonable features on my shell, and fish was much faster and needed almost no plugins.
The fact that I can write a simple for loop without needing to look up how to do it by far beats the POSIX compatibility, if I need it I can still write a bash script, but when using the shell I don't need to recall where semicolons or `do`, brackets (and how many) go.
- macromagnon 5y agoIs it that hard to remember a bash for loop? for i in $(seq 1 10) do echo $i done Then you can just replace new lines with ; if writing a one liner. for i in $(seq 1 10); do echo $i; done I guess it isn't as simple as python for i in range(10): print(i) but it's pretty close aside from the variable binding.
- yesenadam 5y agofor i in {1..10}
- alerighi 5y agoIn zsh you can avoid the do if you have a single instruction: for i in {1..10}; echo $i to me is as clear as the python version. Very compact and useful for one liners.
- shakna 5y agoBash has some subtleties around loops that can be frustrating, like the body of your loop _may_ actually be running in a subshell (common when iterating over a file), making it difficult to extract what you want from it.
- bandie91 5y agoi bet it's the `cat file | while read …` loop what you are referring to, not any loop. but correct me.
- ulam2 5y agoAs someone dealing with new remote machines on a daily basis, I cannot fantasize about any other shell. Bash is pretty straightforward.
- tekknik 5y agoAnd look at all of those finger bending symbols!
- thibran 5y ago> I moved from bash => zsh => fish Did the same, but moved on. Now it is: bash => zsh => fish => nu
- stevage 5y agoWhat did you prefer about nu?
- deleted 5y ago[deleted]
- thibran 5y agoWorking with tables of data feels more right, more like programming then the usual shell. I also work quite often with CSV and it's nice to be able to manipulate/filter it like any other data that nu is able to read (just: open file.csv | find "foobar" | select name message).
- tekknik 5y agoNot quite a straightforward as nu seams to be, but I used to have ipython as my shell when I did a lot of work with CSV. It’s “not a shell” but includes some shell like functions to make listing dirs and such easier.