Hacker News new | past | comments | ask | show | jobs | submit login

I use fish (http://fishshell.com/), and it's amazing. However, they're missing the most important feature from their front page: Syntax highlighting!

Valid executables are colored green, as you type. Invalid commands are red, as you type. Valid files are underlined, as you type.

Like the carpenter who can feels the feedback of the grain of the wood through the handle of his plane can adjust his technique as he planes, fish shell lets me 'feel' the programs and files I'm working with through the shell.

And that makes me happy.




I stopped using fish a while ago, when it would crash whenever I opened a console session (so I couldn't do anything when X didn't start). I switched to zsh with fish emulation, but lately I realized I have a shell that takes much longer to start up and basically does everything fish does, and nothing more.

If fishfish is more stable, I'll switch in a heartbeat.


> I stopped using fish a while ago, when it would crash whenever I opened a console session (so I couldn't do anything when X didn't start)

This is why I launch my interactive shell from a failsafe /bin/sh instead of using chsh. If zsh ever messes up horribly, I end up back in a good old bog standard shell prompt.


I was just wondering how you accomplish that.


I put this at the end of my ~/.profile:

    REALSHELLS="/usr/local/bin/zsh /usr/bin/zsh"
    for REALSHELL in $REALSHELLS; do
    	if [ -e $REALSHELL ]; then
    		if ! $REALSHELL -l; then
    			echo "$REALSHELL exit $?"
    		fi
    		echo "$SHELL exit in 1s, Ctrl-C to abort"
    		sleep 1 && exit
    	fi
    done
    echo "No shells in [$REALSHELLS] found, falling back to $SHELL"


I'd been using fish for a year or two before switching to zsh too.

The main reason for me to give it up is because I could not get it to work smoothly with rvm.

I've gotten quite used to zsh by now, and I have to say, I don't feel much for having another go at fish just to run into the same limitations again.


I just downloaded it and while it looks awesome, I see the rvm problem. I haven't used zsh but I'm assuming from your comment that zsh is compatible with RVM. Seems like it shouldn't be too hard to write a fish version of the script that sets up your rvm environment, but if you've gone down that path and it proved too painful I won't bother. However, perhaps fish + rbenv works. Has anyone tried that?


Yes, I switched from rvm to rbenv because rvm didn’t work with fish. rbenv did work with fish.

I switched away from fish after that because go (a directory-jumping tool) required bash to install (http://code.google.com/p/go-tool/wiki/InstallNotes). I didn’t know how to port that bash code to fish, since I don’t know bash scripting, and I also anticipated that I would keep finding cool programs that didn’t work with fish.


Just add those two files listed here (https://github.com/eventualbuddha/fish-nuggets/commit/186775...) to ~/.config/fish/functions, and everything should work out just fine.


zsh has a plugin for fish-style syntax highlighting: https://github.com/zsh-users/zsh-syntax-highlighting


~ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git Cloning into zsh-syntax-highlighting... warning: remote HEAD refers to nonexistent ref, unable to checkout.

:(




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: