News for hackers. Stuff that matters.
Re:Why Create a New Unix Shell? by earthscienceman on Wednesday January 27, 2021 @01:11AM (#25924884)
It's only tangential but switching to fish shell made me about 3 times more productive. Being able to easily recall commands, to have completions displayed as I type, and to have interactivity be a first class citizen of the environment... made working in the shell so so so so much nicer.

Fish has its own quirks, some of which seem unnecessary, but it was a godsend. There is definitely still room for improvement of the old tools, a. lot. of. room.

Re:Why Create a New Unix Shell? by flohofwoe on Wednesday January 27, 2021 @06:13AM (#25926803)
I switched from fish to zsh once I found this plugin:

https://github.com/zsh-users/zsh-autosuggestions

Now zsh feels just like fish, but with bash-compatible syntax (which was the main day-to-day problem I had with fish, otherwise it's fine, but except for the auto-suggestions I didn't really use any special fish features).

Re:Why Create a New Unix Shell? by gdsimoes on Wednesday January 27, 2021 @01:14AM (#25924899)
I was always reluctant to change my shell, but recently I switched to fish and It’s been a pleasure from day one. I wish I did it sooner.
Re:Why Create a New Unix Shell? by socialdemocrat on Wednesday January 27, 2021 @02:18AM (#25925262)
I have used fish for many years and always been puzzled why it is not more popular. If you want an easy and effective shell that gets out of your way then it is should have been an obvious choice.

Do you have any thoughts on why people don’t try it out? Where u also reluctant?

Re:Why Create a New Unix Shell? by flohofwoe on Wednesday January 27, 2021 @06:24AM (#25926898)
In my case it was the fact that fish's scripting language is incompatible with bash's that made me switch back to zsh (after a few years of using fish). It's not a show stopper (otherwise I had switched back earlier), but there's been a dose of small daily frictions because of that.
Re:Why Create a New Unix Shell? by gdsimoes on Wednesday January 27, 2021 @08:04AM (#25927701)
I try not to use nonstandard software unless it's something I spend a lot of time on. The shell became very important to my work recently, and only then I started looking for alternatives to bash and zsh.
Re:Why Create a New Unix Shell? by socialdemocrat on Wednesday January 27, 2021 @02:15AM (#25925240)
I am a huge fan of fish. Oil shell seems kind of different in aim from fish. Fish is trying primarily to be a great interactive shell and have code which is easy to understand but not necessarily compact of efficient to write. But for me it doesn’t matter. For longer things I use Julia or Go anyway.
Re:Why Create a New Unix Shell? by earthscienceman on Wednesday January 27, 2021 @02:32AM (#25925342)
Absolutely, hence "tangential". I was only hoping to lend credence to the idea that reinventing things is a good idea with a parallel example. I'm not the target audience of oil shell but I wish anyone who takes on something like that all the luck.

It has always baffled me the pushback that is given when someone works on projects like these. As if trying to do better isn't worth it.

Re:Why Create a New Unix Shell? by treve on Wednesday January 27, 2021 @01:58AM (#25925135)
It always surprises me that people get so much productivity gain out of their editors, shells and keyboards and such.

I write maybe a few dozen lines of code on a good day.

Re:Why Create a New Unix Shell? by earthscienceman on Wednesday January 27, 2021 @02:22AM (#25925287)
Well. We all do different kinds of work. I'm a scientist, i spend all day looking at and parsing data in a zillion formats. Not to mention writing papers in latex. My productivity directly depends on my ability to ingest and make sense of text files and code and every day is different. A more efficient shell... or more importantly a shell that frees up brain space for other tasks... makes a huge difference.

I often work with colleagues who ask how j get results so fast. They're very surprised when I say "remote emacs and a solid foundation with shell workflows".

When everything you work with is a text file, getting efficient with the shell just makes sense. Ask a carpenter about their tools and organization and you'll get a similar response.

Re:Why Create a New Unix Shell? by oconnore on Wednesday January 27, 2021 @02:15AM (#25925241)
(Fish doesn't make me 3x more productive, but...) I think a good analogy would be having sharp tools. If you don't have to exert yourself to do simple things, then menial tasks use less mental energy which you can save for your actual work.

Fish manages to pull this off without _any_ configuration burden (I use it completely stock), which is exciting because usually to benefit from shortcuts or macros or other "productivity hacks" you have to become a power user.

Re:Why Create a New Unix Shell? by mro_name on Wednesday January 27, 2021 @03:06AM (#25925532)
their take on config is unique:

> Every configuration option in a program is a place where the program is too stupid to figure out for itself what the user really wants, and should be considered a failure of both the program and the programmer who implemented it.

https://fishshell.com/docs/current/design.html#configurabili...

Re:Why Create a New Unix Shell? by flohofwoe on Wednesday January 27, 2021 @06:19AM (#25926856)
If you're working a lot in the terminal, than fish's convenient auto-suggestion mechanism is really quite a game changer, and it really "feels" 3x more productive because the prediction is pretty good (each directory has its own command history which fish checks first for matches). It's like replacing a traditional search box which only shows exact matches after you hit Enter with a fuzzy-search-box which immediately displays a most likely match while you're typing.

There are plugins for zsh (and maybe other shells) which emulate this feature though.

Re:Why Create a New Unix Shell? by AndrewDucker on Wednesday January 27, 2021 @03:11AM (#25925574)
I am curious what you are doing with the rest of the day? Planning? Meetings?
Re:Why Create a New Unix Shell? by pansa2 on Wednesday January 27, 2021 @05:09AM (#25926346)
In my experience, reading code.
Re:Why Create a New Unix Shell? by treve on Wednesday January 27, 2021 @05:36PM (#25935091)
Figuring out what lines to write, mostly.
Re:Why Create a New Unix Shell? by chovybizzass on Wednesday January 27, 2021 @02:08AM (#25925192)
How does fish compare to zsh? I just switched from bash to zsh and am loving it.
Re:Why Create a New Unix Shell? by divbzero on Wednesday January 27, 2021 @02:15AM (#25925238)
Fish’s strength is in having good defaults that makes it work well out of the box. Fish’s downside is not being POSIX compatible [1] though its creators would argue they deliberately avoided POSIX weaknesses.

If you already have Zsh configured well then Fish probably wouldn’t offer a huge advantage.

[1]: https://en.wikipedia.org/wiki/Fish_(Unix_shell)#Bash/fish_tr...

Re:Why Create a New Unix Shell? by karolkozub on Wednesday January 27, 2021 @06:48AM (#25927076)
For a good default config of zsh I highly recommend oh-my-zsh[0]. I've been using it for years and it's amazing.

[0]: https://github.com/ohmyzsh/ohmyzsh

Re:Why Create a New Unix Shell? by socialdemocrat on Wednesday January 27, 2021 @02:24AM (#25925303)
Fish is a bit like the Mac of shells. Stuff just works and its easy to use while flexible. Lots of little details are well polished.

The downsides are similar to Mac. Less standard/compatible with other stuff. Zsh seems more like a traditional shell. Meaning it is far more complex. Fish really aims to keep simplicity.

I have used Fish for many years and swear by it but I am also not the kind of guy who writes long shell scripts. I use regular programming languages for that. For me fish is mainly about having a shell that works well in interactive use.

Re:Why Create a New Unix Shell? by NinoScript on Wednesday January 27, 2021 @08:10AM (#25927770)
I completely agree with this.

I recommend people Zsh: it's very familiar, scripts copied from the internet will most probably work and they have lots of flexibility to adjust it to their needs.

I personally have a Mac with Fish installed, I don't enjoy the process of sharpening my tools, I'm willing to give up flexibility in exchange of great defaults. It's the same reason why after I learned how to use a sharpening stone, I ended up buying an electric knife sharpener.

Re:Why Create a New Unix Shell? by CameronNemo on Wednesday January 27, 2021 @01:13AM (#25924894)
My least favorite fish quirk is that you cannot use stty to remap Ctrl-C. You need to use stty in another shell, then exec into fish to remap it.
Re:Why Create a New Unix Shell? by faho on Wednesday January 27, 2021 @02:00AM (#25925149)
Good news: In the upcoming 3.2 release, fish will be less insistent on resetting terminal modes, so things like this (and enabling flow control) will be possible.

(I'm the fish dev who implemented that)

Re:Why Create a New Unix Shell? by mongol on Wednesday January 27, 2021 @01:31AM (#25924994)
Why do you remap Ctrl-C?
Re:Why Create a New Unix Shell? by CameronNemo on Wednesday January 27, 2021 @11:21AM (#25930111)
Why wouldn't I remap ctrl-c? It is the shortcut for copy. The letter c is nowhere in the word interrupt.
Re:Why Create a New Unix Shell? by andrewchambers on Wednesday January 27, 2021 @02:04AM (#25925162)
Interesting, it seems a 3x productivity boost to all programmers and admins would be a no brainer for the industry.
Re:Why Create a New Unix Shell? by tal8d on Wednesday January 27, 2021 @02:15AM (#25925239)
If all programmers and admins had the same needs then that would be a logical conclusion. But we don't, so I'll stick to ksh.
Re:Why Create a New Unix Shell? by earthscienceman on Wednesday January 27, 2021 @02:29AM (#25925322)
Not everyone who uses a computer is a programmer or an admin. I can't speak to their needs or what fish provides for them.