Live data from Hacker News

The fish shell is amazing

rmpr.xyz

71–80 of 302 posts

Re: The fish shell is amazing

#71
post #7

I used fish for a couple of years and really liked it. But I recently learned that I can configure ZSH to have all of the same auto-complete and plugins that I loved from fish. Now I have all of the creature comforts I like, with POSIX compliance I found that while fish has better syntax than bash for most things, the hassles with incompatibility or unexpected behavior brought me much more trouble than BASH's syntax…

I moved from bash => zsh => fish. I wanted reasonable features on my shell, and fish was much faster and needed almost no plugins.

The fact that I can write a simple for loop without needing to look up how to do it by far beats the POSIX compatibility, if I need it I can still write a bash script, but when using the shell I don't need to recall where semicolons or `do`, brackets (and how many) go.

Re: The fish shell is amazing

#72
post #7

I used fish for a couple of years and really liked it. But I recently learned that I can configure ZSH to have all of the same auto-complete and plugins that I loved from fish. Now I have all of the creature comforts I like, with POSIX compliance I found that while fish has better syntax than bash for most things, the hassles with incompatibility or unexpected behavior brought me much more trouble than BASH's syntax…

Any suggestions? I’ve recent switched from vanilla bash to ZSH. I mainly use oh-my-zsh and Power10k. Once again the defaults without much customization.

Slimzsh[1] is a very nice default configuration. Just a slim prompt, fast-syntax-highlighting and some vanilla settings.

I keep a personal fork with a few added plugins (most notably zsh-autosuggestions and ssh-agent). No need for a plugin manager.

oh-my-zsh is way too bloated. But it's a nice repo if you're looking for plugins and aliases.

[1]: https://github.com/changs/slimzsh

Re: The fish shell is amazing

#73
post #62

> Smart tab completion not only for the commands but for the arguments as well, and it apparently does that by parsing man pages. And it does this every time you spawn a shell. So if you have set your login shell to fish, then every time you launch a shell it loads all the fish plugins like this one, and that slows it down. And you can’t turn it off, or couldn’t the last time I checked around a year ago. Insult to in…

>And it does this every time you spawn a shell.

It does not. The completion generation is on first start and whenever you run `fish_update_completions`.

(note that the importance of man parsing is often quite overstated, it only gets you so far, all the advanced completion stuff is hand-written)

Source: I'm a fish dev.

Re: The fish shell is amazing

#74

Shells and scripting languages are different things. I don't care how good of a scripting language Powershell is, it's painful to use as a shell. I don't care that fish can't run sh scripts, I've never used it on a machine that didn't have sh. Can we stop judging oranges for their lack of crunch?

Ideally you do want them to be the same, so that the skill of using one reinforces the skill of using the other, and you can begin to shape scripts out of your shell history.

Output redirection doesn't work right with Fish functions, which makes them unusable in certain kinds of scripts. Aside from that, though, Fish is perfectly pleasant for simple scripting. I use Fish for simple stuff and PowerShell for anything serious. Some day I'd like to use something like Elvish or Nushell for both, and use the same language as my interactive shell.

Re: The fish shell is amazing

#75
post #7

I used fish for a couple of years and really liked it. But I recently learned that I can configure ZSH to have all of the same auto-complete and plugins that I loved from fish. Now I have all of the creature comforts I like, with POSIX compliance I found that while fish has better syntax than bash for most things, the hassles with incompatibility or unexpected behavior brought me much more trouble than BASH's syntax…

I just start scripts in bash for compatibility at the beginning or use scripts that state it, avoid scripting as much as possible, and I spent a lot of wasted time with configuration of zsh to get most of the functionality of fish but never as good. What did you install?

Re: The fish shell is amazing

#76
Ok, let's do this. Past related threads:

Fish shell - https://news.ycombinator.com/item?id=27180420 - May 2021 (118 comments)

Fish Shell 3.2 - https://news.ycombinator.com/item?id=26302678 - March 2021 (128 comments)

Fish is not operational on a VT220 terminal (2015) - https://news.ycombinator.com/item?id=25526237 - Dec 2020 (113 comments)

New Features in the Fish Shell - https://news.ycombinator.com/item?id=24631138 - Sept 2020 (138 comments)

Dolphins learn from their peers to use empty shells to catch fish - https://news.ycombinator.com/item?id=23660910 - June 2020 (8 comments) (Fish: A command line shell for the 90s - https://news.ycombinator.com/item?id=21361696 - Oct 2019 (83 comments)

Fish shell 3.0 - https://news.ycombinator.com/item?id=18776765 - Dec 2018 (220 comments)

Fish: A user-friendly command line shell for macOS, Linux, etc - https://news.ycombinator.com/item?id=15910897 - Dec 2017 (204 comments)

Fish (Shell) for a Week - https://news.ycombinator.com/item?id=14422672 - May 2017 (2 comments)

The fish shell is awesome - https://news.ycombinator.com/item?id=14179081 - April 2017 (7 comments)

Fish Shell Design Principles - https://news.ycombinator.com/item?id=11102941 - Feb 2016 (71 comments)

Fish shell 2.2 - https://news.ycombinator.com/item?id=9873090 - July 2015 (70 comments)

Fish shell - https://news.ycombinator.com/item?id=9566441 - May 2015 (182 comments)

FISH Shell: A dynamic shell - https://news.ycombinator.com/item?id=8783150 - Dec 2014 (3 comments)

Fish shell 2.1 - https://news.ycombinator.com/item?id=6626635 - Oct 2013 (151 comments)

fish shell - https://news.ycombinator.com/item?id=6224524 - Aug 2013 (75 comments)

Fish shell 2.0 - https://news.ycombinator.com/item?id=5723235 - May 2013 (175 comments)

Fish 2.0 shell beta - https://news.ycombinator.com/item?id=5567639 - April 2013 (56 comments)

Fish: Finally, a command line shell for the 90s - https://news.ycombinator.com/item?id=4073162 - June 2012 (146 comments)

Fish sucks (but your shell sucks more) - https://news.ycombinator.com/item?id=2031110 - Dec 2010 (60 comments)

Fish - The friendly interactive shell - https://news.ycombinator.com/item?id=820677 - Sept 2009 (16 comments)

Fish Shell: A User-Friendly Shell or Like a Heavily Customized zsh - https://news.ycombinator.com/item?id=811113 - Sept 2009 (8 comments)

Re: The fish shell is amazing

#77
post #7

I used fish for a couple of years and really liked it. But I recently learned that I can configure ZSH to have all of the same auto-complete and plugins that I loved from fish. Now I have all of the creature comforts I like, with POSIX compliance I found that while fish has better syntax than bash for most things, the hassles with incompatibility or unexpected behavior brought me much more trouble than BASH's syntax…

zsh is not POSIX compliant and never had a goal of being POSIX compliant. (Amusingly, I use bash and I can pretty much replace “zsh” in your claim with “bash” and have it apply to my usage-except in this case it would be true :P)

Re: The fish shell is amazing

#79
post #67

Earlier quoted context omitted.

Bass has never worked for me, in any scenario. I'm curious to see how you use it. I have never successfully been able to feed it any bash script. At this point I suspect I'm either holding it wrong or it is a thing that is invoked as a thing that works without ever being used in earnest.

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. The only thing I ever used bass for was this edge case where at work the way we login to AWS is using this Okta AWS integration that prints out a list of export commands. Since fish isn’t compatible with bash export commands, I just run that command result through bass, which automatically…

> 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

Re: The fish shell is amazing

#80

Shells and scripting languages are different things. I don't care how good of a scripting language Powershell is, it's painful to use as a shell. I don't care that fish can't run sh scripts, I've never used it on a machine that didn't have sh. Can we stop judging oranges for their lack of crunch?

Eh. Tbh I'm find both powershell and unixy shells have their advantages and warts. I'm not sure either is "better". Maybe I'm just not a fan of shells in general.
Post reply on HN