Live data from Hacker News

Why Create a New Unix Shell?

oilshell.org

51–60 of 63 posts

Re: Why Create a New Unix Shell?

#51

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 t…

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?

#52
post #18

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 t…

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.

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?

#53
post #5

Earlier quoted context omitted.

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.

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?

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?

#54

Earlier quoted context omitted.

How does fish compare to zsh? I just switched from bash to zsh and am loving it.

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...

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?

#55
post #5

Earlier quoted context omitted.

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.

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?

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?

#56

Earlier quoted context omitted.

How does fish compare to zsh? I just switched from bash to zsh and am loving it.

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 sh…

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?

#57
I would like to know other people's habits.

for example, I always close browser windows and only keep a few tabs open at once, and then found out I was weird and many people keep huge amounts of tabs around.

My personal habit is to use bash, and always write shell scripts with #!/bin/sh as the first line.

Thing is - I've haven't tried other shells (since I was a student) because of "linux superstition". Same superstition that chooses filenames without spaces and prevents putting "." in your path.

Thing is - I think maybe decoupling the user interface from the scripting language should be more of a thing. People don't have as much trouble switching out their terminal emulator (a way of taking up the slack).

Maybe the way to a better UI while maintaining compatibility would be to choose a good "user interface" shell and maybe exporting SHELL=/bin/bash so scripts run?

Re: Why Create a New Unix Shell?

#58
post #8

Earlier quoted context omitted.

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.

Why do you remap Ctrl-C?

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?

#59
post #18

Earlier quoted context omitted.

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.

I am curious what you are doing with the rest of the day? Planning? Meetings?

Figuring out what lines to write, mostly.

Re: Why Create a New Unix Shell?

#60
post #32

Earlier quoted context omitted.

Yeah I hope people will build stuff like that on top of Oil. Hopefully this year the embedding story will become clearer, and progress can be made on top. Some notes here about interactive shell ideas: https://github.com/oilshell/oil/wiki/Interactive-Shell Some people might think Oil is sort of a text-only or retro project ... but it really isn't, it's a SPEED project. I use shell because it's the fastest to get cert…

One thing newbies often ask, is why can't they write a shell script which changes the environment or directory of their running shell. The answer, of course, is that you can't, without sourcing it. People also ask the same question about Windows, and even DOS before it; there you actually could do it from a batch file, since CMD.EXE/COMMAND.COM effectively sources all batch files, it doesn't run them in a subprocess…

Yes there are some ideas discussed here:

https://github.com/oilshell/oil/issues/738

I would call the 2 possible solutions an API or IPC, and what you're describing is basically IPC.

The devil is in the details though... I'm interested in a prototype :) A consumer of the interface will help shape it.

Post reply on HN