Live data from Hacker News

Fish shell

fishshell.com

51–60 of 120 posts

Re: Fish shell

#51
post #3

I did myself a favour, and instead of learning a new shell read through grymoire's POSIX shell tutorial: https://www.grymoire.com/Unix/Sh.html .

I'm a fish user for over 10 years now; for me a big part of the appeal of fish was (and still is) that I could get a much better quality of life without having to train myself to wizard-level with the less ergonomic but ubiquitous bash. I'm sure any black belt bash wizard will leave me in the dust on every metric, but that's fine, I don't need my shell environment to be super optimized for maximum effectiveness, it j…

I definitely agree with you, it's just not worth struggling with something you don't like.

For me this was vim. After struggling for many years with this ancient and difficult text editor peddled as the holy grail of productivity one day i just said fuck it and switched to a more sane text editor called nano. My life became instantly better and I've never looked back.

I really wish I made the switch earlier instead of suffering through the never ending annoyance of vim because i at the time I thought i was still learning it and one day it will all be worth it.

Re: Fish shell

#52
post #48

Earlier quoted context omitted.

About 98% of common POSIX shell usage is covered by fish, right down to identical syntax. (Not everything is.) Biggest tip for fish switchers: set fish as your terminal's shell instead of changing your login shell.

> Biggest tip for fish switchers: set fish as your terminal's shell instead of changing your login shell. That's an interesting idea - I will try that. This bit me recently when I used Migration Assistant to move from a Mac with Catalina to one with Big Sur; my login shell was still set to the path for fish installed via Homebrew, but none of those packages were copied over. I managed to hack around it by copying bas…

IMO it's worth it to avoid Relocated Items popping up after every update.

Re: Fish shell

#53
I've been using fish for years and adding fish bindings to ROS remains my biggest open source contribution. It's a joy to use.

Re: Fish shell

#54
post #40

I've been using fish for a year. I don't bash much, so that's a data point. I really enjoy it. Faster than zsh once it's loaded with all the plugins that make it behave like default fish.

> Faster than zsh Definitely, and it's noticeable. > once it's loaded with all the plugins that make it behave like default fish Fish also feels more cohesive in this situation; a case of built-in features being more refined due to being under the purview of maintainers and shipped to everyone.

>Definitely, and it's noticeable.

I've heard people say the same about zsh vs bash but when macOS updated I never even noticed.

Re: Fish shell

#55
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

My biggest drawback for fish is that there is no way to concatenate several commands inside a block that I know of.

In bash, I can run the following do the following, and the only ways I found to do this in fish are using several commands or calling `bash -c` with a subcommand.

```

(cat file_1; cat file_2 | grep something) | sort

```

Re: Fish shell

#56
Unrelated but the logo reminded me of some Internet culture. Way back in the AOL days where phishing was coined, hackers referred to phished accounts as <, were called phish tanks.

Re: Fish shell

#57
post #55
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

My biggest drawback for fish is that there is no way to concatenate several commands inside a block that I know of. In bash, I can run the following do the following, and the only ways I found to do this in fish are using several commands or calling `bash -c` with a subcommand. ``` (cat file_1; cat file_2 | grep something) | sort ```

It's simply a block, and fish specifies blocks with "begin" and "end".

    begin; cat file_1; cat file_2 | grep something; end | sort
(note that this is distinct from a "subshell", which has a separate environment and typically is more confusing than helpful. In this particular case it doesn't matter)

Re: Fish shell

#58
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

Same for me. And fish is so much nicer that I’m not willing to use a less ergonomic shell on the system I use 99% of the time for the benefit of having it act exactly like the 1% environments.

And FWIW, those 1% environments don’t look and exact exactly like my local system, where I have a nice prompt configured and there are lots of aliases and functions I use frequently. My local bash is nearly as different from my remote bash as my fish is from bash.

Re: Fish shell

#59

I tried it on my mac but all the paths are underlined like hyperlinks and it's strange. I'm using iterm2

Fish's highlighter highlights valid paths with the color specification given in $fish_color_valid_path. By default that's "--underline".

If you don't want it, set the variable to empty with

    set fish_color_valid_path

Re: Fish shell

#60
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

About 98% of common POSIX shell usage is covered by fish, right down to identical syntax. (Not everything is.) Biggest tip for fish switchers: set fish as your terminal's shell instead of changing your login shell.

If you do this, you will probably also want to add `-fish` to Terminal's preference Profiles > Shell > Ask before closing (*only if there are processes...). This will prevent you from getting prompted when closing a Terminal tab with the default shell running.
Post reply on HN