Hacker News new | ask | show | jobs
by StavrosK 4782 days ago
I see your zsh and I raise you fish: http://ridiculousfish.com/shell/

Try it. It's better.

5 comments

I do love the tagline "_Finally, a command line shell for the 90s_".

I was happy enough sticking to bash as it's the default shell everywhere, but since someone switched me to Zsh (using oh-my-zsh) I probably rely on the features too much to ever go back. I also hear https://github.com/sorin-ionescu/prezto is a nicer, cleaner fork of oh-my-zsh but I haven't so found the overwhelming desire to go through the switching pains.

The entire site seems to have that tagline through it as a running joke. I also thoroughly enjoy it.

"Watch out, Netscape Navigator 4.0!" and so on.

I use fish. It's pretty fun to use. It has some pain points (most notably missing things like subshells and inline variable exporting) but it's in beta, so we'll see where it goes. I love the completions though, and it's definitely worth checking out for those alone.
The subshell syntax is there, it just looks different. Instead of: echo `mycmd`. It's echo (mycmd).
I think you're getting your terminology mixed up: the bash man page calls what you described command substitution. Launching a subshell is something different and in bash it is done with parenthesis.
I tried fish for a while, and it's really great. The out of the box experience is way better than zsh and bash. But I switched to zsh, mostly because I couldn't get used to the different syntax.
I just tried fish, way too slow. I held down the backspace key, and instead of deleting 10 characters, the entire line was gone. zsh is also too slow. bash may not have the bells and whistles, but it's at least super fast and doesn't get in your way.
> It's better.

What's "better" about it?

1) A pretty great experience even before you start customizing. I only add a git status section to my status line and set some environment variables in my config.fish file.

2) An effort to clean up and orthogonalize shell syntax. The potential portability means I usually still make bash scripts when I'm sharing for others, but for my own stuff it's great.

3) Suggested completions. I start typing a command and if it's one I've used before in that directory it appears in faint gray letters on my command line and I just have to press ctrl-f to bring it up that way.

4) Probably a consequence of (1), but it feels very fast to me compared to when I used zsh. The author also talks about using threads and minimizing disk access to speed it up, but I don't really know how it compares to zsh on that level.

I don't care about experience before I start customizing because I am very certain that I will want to customize. A smaller configuration file does not benefit me at all.

I don't find zsh to be slow even on an older machine, so I'm puzzled what you mean by that.

Which only leaves the suggestion feature, which is interesting but not enough for me to pick up yet another shell with syntax that is even more different from the rest.

Regarding #3, you can also just press right arrow.
It's got all the zsh features and doesn't need 4 seconds to start, like zsh did for me with oh-my-zsh.
Oh-my-zsh is responsible for being slow as hell. If you really want plugins, Prezto probably still has what you want and is significantly faster on startup. (In my experience, with very minimal customization.)
Well, in the end I realized I had customized it to look and work exactly like fish, so I switched to fish.
i just tried fish. out of the box experience is great. not digging much yet but so far, so good. much faster start up time than zsh. this is 2013 already and i seriously dont' want a shell takes up a second or 2 to fire up.
I just tried fish and after half a minute declared it too slow: it is slow to complete (and not very good) and slow to print (or maybe slow to glob: "ls " takes far more time in fish than in bash or zsh).

I do not know if it has all I love in zsh (things like (.) or (om^/) or * or !$), but I would not trade zsh's completion for gaining 10% on startup time.

Current fish author here. Thanks for giving fish a try! I hope you tested a 2.0 branch build, and not the 1.x train from 2009 - a lot has changed since then, including major performance improvements. Check $FISH_VERSION if you are unsure.

'ls' is slower on fish because it passes the -G ("colorize”) flag to /bin/ls, which gives you nice colors, but requires a stat of each file to determine its type. If you want faster but uncolored output, you could redefine the ls function to invoke the ls command with no arguments:

    alias ls 'command ls'
For other instances of slowness or bad completions, we’d sure appreciate it if you opened an issue on the github page at http://github.com/fish-shell/fish-shell/issues/
I just checked and fish is way slower at 'ls *' than zsh. (zsh was done 2x as fast even with a directory with more than 3x as much stuff in it)

I have also a few other flags set in my zsh aliases that's not in fish.

(Tested with 2.0b2)

fish passes the -G flag to 'ls' by default, which produces colorized output, but stats each file. So fish is actually outputting more information than zsh, and what your test is really measuring is the speed of '/bin/ls' vs '/bin/ls -G'

To compare ls speeds for the same workload, run it directly: /bin/ls. I expect no difference, because it is the same binary.

If you wish to compare globbing speeds, do not use bare ls, which does more work in fish. Instead, invoke the ls binary: '/bin/ls * '. Or better yet, just echo: 'echo *'.

I have ls aliased to 'ls -F -H --color=yes --group-directories-first', so no.

('/bin/ls *' is just as fast with '--color=yes' for me btw)

I use zsh on my low-spec netbook and have not noticed slow startup times for my shell. That said, I do have a minimalist setup.

    FreeBSD
    DWM
    dmenu
that's probably because i use zsh with prezto (a fork of oh my zsh)