Live data from Hacker News

fish shell

fishshell.com

41–50 of 78 posts

Re: fish shell

#42
post #36

Earlier quoted context omitted.

it looks like a NP-Complete problem

A solution that converted as many easy things as possible and then output anything it couldn't figure out somewhere so you could convert that by hand would still probably be rather useful.

Agreed. And from what I understand it's how the python 2 -> 3 transition was dealt with.

Re: fish shell

#43
post #31

I have been using fish for a few months exclusively on my Mac. I really miss a few bashisms: mostly pressing esc-. inserts the last part of the last command. I have not changed the shell on my server, somehow I am afraid of breaking things... (bad shell scripts that don't have correct shebang line).

In fish it's simple enough to start typing the command you want and then hit arrow right to autocomplete. If you have a couple often commands that start the same way just arrow up or down to cycle through them, then arrow right to put them on the command line.

Simplified example: mkdir foo, cd foo. I type in mkdir foo then press enter, type "cd esc-.". Doesn't work. Command completion in fish doesn't help here. In real life this is of course mostly more complicated than a simple "foo".

Re: fish shell

#44
post #12

I like the features it has, but every time someone post a link to fish shell, I wonder why I would switch from bash or zsh. Will this really be THAT MUCH BETTER? Will I just run into weird errors? Is it totally sh compliant? These are important things to know and should be on the homepage.

I am a year-or-two-old fishshell convert who is reasonably well versed in bash and tried using zsh and bash with a big .bashrc. A few things stand out to me as huge pluses: - It has a lot of cool functionality out of the box such as highlighting, smarter autocomplete (type in a partial word at the prompt and hit up instead of the cumbersome bash ctrl r/s history prompt that loves to beep at you), directory history (a…

I fully agree: The sensible and intuitive defaults (ie. arrow up/down for history; tab/rightarrow for autocompletion) and simply so much which just works out of the box (beautiful styled completion list with program descriptions in it, colors, sensible help) made me instantly fall in love with fish.

Be sure to try Fish 2.0 which is even much more awesome than the older version.

Re: fish shell

#45

I have been using fish for a few months exclusively on my Mac. I really miss a few bashisms: mostly pressing esc-. inserts the last part of the last command. I have not changed the shell on my server, somehow I am afraid of breaking things... (bad shell scripts that don't have correct shebang line).

esc-. is my biggest miss as well. There are discussions on this but still havent been able to fix it on osx in iterm2 myself. Did get option-. to work for now but esc-. has 20+ years of pure reflex action burned into my brain.

Can you post your solution (or give a pointer)?

Re: fish shell

#47

One of my favourite features: a single configuration file. No more .bashrc and .bash_profile . However, it seems like Fish is not fully POSIX-compatible, therefore you can face weird problems in Vim plugins, for example.

In your .vimrc, insert at the top:

set shell=/bin/sh

No more problems with plugins in fish.

Re: fish shell

#48
post #31

Earlier quoted context omitted.

In fish it's simple enough to start typing the command you want and then hit arrow right to autocomplete. If you have a couple often commands that start the same way just arrow up or down to cycle through them, then arrow right to put them on the command line.

Simplified example: mkdir foo, cd foo. I type in mkdir foo then press enter, type "cd esc-.". Doesn't work. Command completion in fish doesn't help here. In real life this is of course mostly more complicated than a simple "foo".

function mkcd () { mkdir -p "$1" && cd "$1" }

Re: fish shell

#49
post #31

Earlier quoted context omitted.

In fish it's simple enough to start typing the command you want and then hit arrow right to autocomplete. If you have a couple often commands that start the same way just arrow up or down to cycle through them, then arrow right to put them on the command line.

Simplified example: mkdir foo, cd foo. I type in mkdir foo then press enter, type "cd esc-.". Doesn't work. Command completion in fish doesn't help here. In real life this is of course mostly more complicated than a simple "foo".

I use zsh and for this use case I typically use "mkdir foo" followed by "cd $!".

Re: fish shell

#50
Gave fish a shot for a week or so. It gives some "oohs and ahs" right off the bat, but in the long term, not something that I could use.

Maybe if it was at least somewhat bash or POSIX compatible I would be on board, but the developers don't even seem to want to help us out in that regard.

Post reply on HN