Live data from Hacker News

The fish shell is amazing

rmpr.xyz

291–300 of 302 posts

Re: The fish shell is amazing

#291
post #147

Earlier quoted context omitted.

The best reason to choose fish over zsh is that everything works so well out of the box that you stop messing with it. I haven’t tweaked my shell config in 7 or 8 months now. This is a different mindset from the giant zsh configs, “plugin managers” and other junk that is wholly irrelevant to using the shell. You’d think that fish incorporating a lot of functionality that zsh has would manifest as bloating fish, but,…

Another issue with zsh plugins is that they are incredibly slow. Oh-my-zsh makes every terminal feel like it’s running on another machine over ssh

I use starship and it’s been pretty great and very fast.

Re: The fish shell is amazing

#292

Earlier quoted context omitted.

> The point of fish is that there is no configuration required. I think it would be more accurate to say that the point of fish is that there is no configuration allowed . If you don't like the out of the box configuration, I would say configuration is still required , but it's unfortunately not available . If you happen to like every single decision the developers made, then I admit having no configuration does mean…

> If you don't like the out of the box configuration, Then either decide to like it -- humans are adaptable, this is possible -- or don't use the thing. Both outcomes are acceptable. A hammer doesn't need to have a configurable grip and head and claw in order to be a good tool.

Yes - that's exactly what I said. I'm not sure where you think you disagree. The point of fish is that configuration isn't allowed. I, personally, don't use it.

Re: The fish shell is amazing

#293

Earlier quoted context omitted.

> If you don't like the out of the box configuration, Then either decide to like it -- humans are adaptable, this is possible -- or don't use the thing. Both outcomes are acceptable. A hammer doesn't need to have a configurable grip and head and claw in order to be a good tool.

Yes - that's exactly what I said. I'm not sure where you think you disagree. The point of fish is that configuration isn't allowed. I, personally, don't use it.

I guess there isn't disagreement! :) Maybe the point is that you would say it's not allowed whereas I would say it's not necessary.

Re: The fish shell is amazing

#294

Is no one going to comment on for *.pdf assumes no spaces in filenames for the BASH example to be correct, what about Fish?

Globs work correctly in Bash (not “BASH”), even with spaces in filenames. Yes, you need to quote most variable substitutions[0], but globs are fine.

[0]: except in the RHS of a variable assignment or after the ‘case’ keyword

Re: The fish shell is amazing

#295
post #290
post #79

Earlier quoted context omitted.

> If your bash script has a shebang you shouldn’t need bass at all. Fish will read the shebang and just run your script with bash. Shebangs are actually handled by the operating system kernel! I only know this because certain kinds of shebangs work on Linux, but not on other OSes

That’s pretty neat information! I honestly barely know how all the pieces come together.

I was kind of hoping my comment would bait some OS person lurking on HN into really explaining interpreter directives, hahaha

Re: The fish shell is amazing

#296
post #28

Earlier quoted context omitted.

This is my problem as well. I’ve been using fish for quite a long time, and I’m still frustrated by weird posix incompatibility.

>I’m still frustrated by weird posix incompatibility. Can you also share what are the most significant problems with posix incompatibility for you? Why is it a problem?

Honestly, I think it’s just fighting years of muscle-memory more than anything. Not necessarily a valid complaint, I know.

Re: The fish shell is amazing

#297
I use and like fish, they mention the default color scheme, I keep meaning to change the unrecognised color from red to yellow. My general theory is that things with typos in them should be easier to read, than things recognized as syntactically correct, as you need to actually read the typo text to figure out what you've done wrong.

Re: The fish shell is amazing

#298
post #225

Earlier quoted context omitted.

AFAIK that will be remedied in an upcoming release.

Indeed, the following should work with upcoming fish 3.4: echo "pwd: $(pwd)" See https://github.com/fish-shell/fish-shell/pull/8059

Oh awesome, Fish just keeps getting better and better!

Re: The fish shell is amazing

#299

Earlier quoted context omitted.

For example, Macports puts its installed binaries into /opt/local/bin (and sbin), and the installation process put this into my .profile: # MacPorts Installer addition on 2016-07-01_at_00:46:04: adding an appropriate PATH variable for use with MacPorts. export PATH="/opt/local/bin:/opt/local/sbin:$PATH" # Finished adapting your PATH environment variable for use with MacPorts. And I had to put the fish equivalent of t…

Umm, you don't need to define your PATH variable in `config.fish`, not unless you make it your default login and user shell. You should keep using bash as your default login and user shell, define your environment variables, like PATH, in your `.bashrc`/`.bash_profile` but use fish as the default shell of your terminal emulator. In that case, fish should pick up the PATH from bash.

That addresses only the part of setting up PATH variable. Some init scripts go beyond that and have additional code embedded in them (see sdkman, pyenv). These needs separate init scripts for fish users. Just a cursory look at github issues can show how prevalent this issue is:

https://github.com/search?q=fish+support&type=issues

Re: The fish shell is amazing

#300
post #299

Earlier quoted context omitted.

Umm, you don't need to define your PATH variable in `config.fish`, not unless you make it your default login and user shell. You should keep using bash as your default login and user shell, define your environment variables, like PATH, in your `.bashrc`/`.bash_profile` but use fish as the default shell of your terminal emulator. In that case, fish should pick up the PATH from bash.

That addresses only the part of setting up PATH variable. Some init scripts go beyond that and have additional code embedded in them (see sdkman, pyenv). These needs separate init scripts for fish users. Just a cursory look at github issues can show how prevalent this issue is: https://github.com/search?q=fish+support&type=issues

Python venv works fine with fish shell for me. But yeah, this is something that'll always be an issue with fish simply because bash is more widely used.

Unlike what some people may think, it's not just about the tool itself but its ecosystem as well.

Post reply on HN