Live data from Hacker News

Fish: Finally, a command line shell for the 90s

ridiculousfish.com

81–90 of 155 posts

Re: Fish: Finally, a command line shell for the 90s

#81
post #55
post #24

Earlier quoted context omitted.

1: a. Superb readline colouring. Nonexistent commands are shown in red, commands that exist and are on PATH in green. Unclosed string literals become obvious. b. A history search that is orders of magnitude better that Ctrl-r in Bash. (Though oh-my-zsh has the history-substring-search plugin which provides this functionality.) c. Features work out of the box, fish helps you avoid managing a .zshrc equivalent file. d.…

I do not understand your last paragraph. Don't your wrapper scripts have "#!/bin/sh" at the top?

The point isn't executables that happen to be written in {ba,}sh, it's wrappers that attempt to add functionality to your commandline. For example, Python's virtualenv and Ruby's rvm presumably don't work.

Re: Fish: Finally, a command line shell for the 90s

#83

Why does xargs under fish not accept {} as a replstr like it does with bash? find . | xargs -I {} grep pat {} On OS X fish this gives "xargs: replstr may not be empty" and on Linux fish I get "xargs: command too long". Using % as the replstr for example does work though.

Fish does brace expansion, even for empty braces. In order to actually pass braces to xargs, do:

    find . | xargs -I \{\} grep pat \{\}

Re: Fish: Finally, a command line shell for the 90s

#84
post #24

They need to update the slogan? "A command line shell for the 90s" doesn't really draw me in. What I want to know: 1. In what specific ways is it better than zsh? 2. Is it absolutely, rock-solid stable?

1: a. Superb readline colouring. Nonexistent commands are shown in red, commands that exist and are on PATH in green. Unclosed string literals become obvious. b. A history search that is orders of magnitude better that Ctrl-r in Bash. (Though oh-my-zsh has the history-substring-search plugin which provides this functionality.) c. Features work out of the box, fish helps you avoid managing a .zshrc equivalent file. d.…

Please elaborate on point 1b. I certainly see ways ctrl-r can be improved, but orders of magnitude (while obviously subjective in something like this) would surprise me. That said, I hope to be surprised!

Re: Fish: Finally, a command line shell for the 90s

#85
post #80
post #55

Earlier quoted context omitted.

I do not understand your last paragraph. Don't your wrapper scripts have "#!/bin/sh" at the top?

That's being explicit, the problem is with wrapper scripts that omit that, assuming a sh compatible shell. Still running fish on one of my systems, excited to see new development work as it was getting past the point where I was comfortable using it on anything new.

An old trick for convincing (some) shells that your script is an sh-compatibile shell is to use a colon on the first line. Support for this trick was added to fish back in 2007: https://gitorious.org/~ridiculousfish/fish-shell/fishfish/bl...

Re: Fish: Finally, a command line shell for the 90s

#86
post #9
post #3

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

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.

Re: Fish: Finally, a command line shell for the 90s

#87

Why does xargs under fish not accept {} as a replstr like it does with bash? find . | xargs -I {} grep pat {} On OS X fish this gives "xargs: replstr may not be empty" and on Linux fish I get "xargs: command too long". Using % as the replstr for example does work though.

Fish does brace expansion, even for empty braces. In order to actually pass braces to xargs, do: find . | xargs -I \{\} grep pat \{\}

OK, thanks.

Re: Fish: Finally, a command line shell for the 90s

#89

Under the known bugs and issues: History file should apply some kind of maximum history length Fine, but the default needs to be large, like 100MB. Disks are big now. I hope ridiculousfish agrees.

Disks are big, but I think 100MB is maybe a bit excessive...even 10MB gives you 40k lines of history, at 256 bytes per line, and that is a conservative estimate.

Re: Fish: Finally, a command line shell for the 90s

#90
post #42

Earlier quoted context omitted.

Yes it can. Add something like this to your zsh config: zstyle ':completion:*:manuals' separate-sections true zstyle ':completion:*:manuals.*' insert-sections true zstyle ':completion:*:man:*' menu yes select

That's it. This thread sold me. Installing zsh now!

Tried fish yet? I prefer it to zsh ...
Post reply on HN