Live data from Hacker News

Fish shell

fishshell.com

91–100 of 188 posts

Re: Fish shell

#91
post #66
post #15

Fish is great. For those wondering what advantages is has over zsh+ohmyzsh, I can say is that by default it provides most the functionality you want without having to install/tweak anything. Git support is built in (you get a nice git prompt) there's syntax highlighting, amazing history completion, predictive commands, man page completions... and so on. To try it on linux, just install fish and then run "fish", to ge…

> Only problem is it's not POSIX so there is some weirdness in command substitution, logical operators and stuff. So you still script in sh. Yeah some wild-card matching stuff doesn't work, also for example expanding `pkg-config --cflags gobject-2.0` as one would in bash requires calling eval gcc. On the other-hand it's not like Bash doesn't have weird gotcha's -- for example does anyone remember which of these is a…

I'm never sure when these plugs become too much, but...

I created a language called bish that allows you to write your shell scripts in a sane and comfortable syntax. No more remembering which one of those conditionals to use! Bish compiles to bash, so you also get to keep all of the portability that comes with bash scripts. I haven't had much time to work on it recently, and it's still missing some features, but it's ready to use now:

https://github.com/tdenniston/bish

Re: Fish shell

#92
post #70

Fish is definitely good, but not great enough to justify a switch from Bash. I maintain tens of thousands of lines of Bash scripts and was considering switching to Fish once, but decided it wasn't worth it. When you compare the *nix shells to PowerShell, they feel prehistoric. We all use grep, sed, awk, and the likes, but don't you get tired of having to deal with unstructured data and gross limitations of the shell…

Using fish doesn't mean you have to stop using existing bash scripts.

I understand that, but my point was that Fish is yet another big missed opportunity.

Re: Fish shell

#93
post #74

Earlier quoted context omitted.

> Fish not being bash compliant was a deal breaker for me. Would you mind elaborating here? I'm very honestly curious how the deal gets broken for you. To explain my curiosity, I've long since come to the opinion that we're in the midst of a long, somewhat painful split caused by a design dissonance over improving the interactive shell UX versus creating a better environment for scripting. We've been building alterna…

When used as a login shell, shell is expected to source some init scripts to fix PATH, locale and stuff; if a particular distro is not written with alternative shells in mind this will fail, esentially making you use two shells which is cumbersome enough to be a deal breaker.

Thanks for the input; that's a good point. For my part, I don't tend to run into this, as I either run a stock distro shell or I go all the way and install the half-sentient metavirus that's my homedir repo. Which I've taught to deal with such vagaries rather efficiently over the years.

Re: Fish shell

#94
post #70

Fish is definitely good, but not great enough to justify a switch from Bash. I maintain tens of thousands of lines of Bash scripts and was considering switching to Fish once, but decided it wasn't worth it. When you compare the *nix shells to PowerShell, they feel prehistoric. We all use grep, sed, awk, and the likes, but don't you get tired of having to deal with unstructured data and gross limitations of the shell…

Is there a simple, sane introduction to PowerShell? I've read through a dozen PowerShell scripts in the last week and find them incomprehensible compared to Bash scripts.

I know I learned Bash 15 years ago, but it's not just familiarity that's causing the confusion

Re: Fish shell

#95

I used to use fish, and emacs. But when I switched to vim, I had to switch away from fish as well because of its lack of vi bindings. It is a little disappointing to go back to using bash, but as long as bash-completion is working, it's not really a big issue. Of course, I do miss the syntax highlighting. (I would use zsh, but it provides little benefit over bash out of the box and is slower (oh-my-zsh is unbearably…

> I had to switch away from fish as well because of its lack of vi bindings.

No you didn't. I use vim and fish just fine. Just put this in your .vimrc:

  set shell=/bin/bash

Re: Fish shell

#98
post #82
post #16

2.2 beta 1 was released last week. Testers welcome!

Has the bug with removing autoloaded functions been fixed yet?

If you mean the fact that a removed autoloader function may be autoloaded again, then yup, that's fixed in 2.2. Here's the issue that tracked it: https://github.com/fish-shell/fish-shell/issues/213

Re: Fish shell

#99

I used to use fish, and emacs. But when I switched to vim, I had to switch away from fish as well because of its lack of vi bindings. It is a little disappointing to go back to using bash, but as long as bash-completion is working, it's not really a big issue. Of course, I do miss the syntax highlighting. (I would use zsh, but it provides little benefit over bash out of the box and is slower (oh-my-zsh is unbearably…

> I'm used to typing '\', and that's not possible with fish. Additionally, to get one backslash in any sort of regex (sed, grep), you need four backslashes.

This is a piece of technology we used to have and then somehow lost. Common Lisp uses ~ as the control character for format strings. C uses \ as the control charcter for raw strings, and % as the control character for format strings. HTML uses &. But regexps use \. JSON uses \. And JSON is a new format! \ was literally the worst possible choice. As soon as you have multiple formats sharing a control character, you start to need huge power-of-two runs of it in order to say what you mean.

Who thought it was a good idea to reuse control characters? \ is used in raw string definitions. It should not be used in any other format, if strings might be used to invoke that format. This is a clear case where every standard doing its own unique thing is the correct approach, but we seem to be moving in the other direction.

Re: Fish shell

#100
Hey, I'm the lead dev of the fish shell. There's some great discussion in this thread!

For those who are interested, the fish shell is about to release version 2.2, a very significant release that wraps up eighteen months of development. You can try the beta now: http://fishshell.com/beta/

A sampling of new features:

- vi mode (yay!)

- Abbreviations, fish's take on aliases. They expand as you type them.

- A new "inline" pager, inspired by zsh. It's searchable and supports progressive disclosure. See it in action: https://www.youtube.com/watch?v=ncVWbT-jWAw

- A redesigned theme and prompt chooser: http://fishshell.com/beta/assets/img/screenshots/web_config....

- Tons of new tab completions!

Post reply on HN