Add fish shell as an option for user's default shell

Problem/Justification
Add fish shell as an option for user’s default shell.

Impact
Fish = “friendly interactive shell”! One of my favorite shells.

User Story
Add as a possible selection in Credentials->Users->Edit

1 Like

Fishy idea
What’s the benefit over the usual suspects bash, (t)csh or zsh?

1 Like

Really, it’s just personal preference. Personally I like fish for navigating around the filesystem via the cli, and command completion. Here are a few advantages:

  • User-Friendly Syntax: Fish has a more intuitive and readable syntax compared to Bash and Tcsh. It uses simple, easy-to-understand commands and structures.
  • Autocomplete: Fish offers powerful and flexible autocomplete features that are context-aware. This means it can suggest commands, options, and even file paths based on what you’ve typed so far1.
  • Syntax Highlighting: Fish provides syntax highlighting, which helps you quickly identify errors and understand the structure of your commands.
  • Abbreviations: Fish allows you to create abbreviations that expand as you type, making command entry faster and more efficient.
  • Interactive Features: Fish includes interactive features like command suggestions and history search, which can significantly speed up your workflow.

Here’s a quick YouYutube overview as well: https://youtu.be/oy-jQonQi_4?si=oytNybOZDuPRVilJ&t=127

1 Like

I wanted to chime in with a +1 for this. fish has a lot of sane defaults that other shells need a lot of configuration for. It’s recently become my go to shell.

I’m split on this one.

I use Fish myself on my desktop, but I’m not sure if it’s pragmatic to include it as a shell in a NAS server that you’re not meant to spend too much time in the command-line. ZSH is already plenty feature-rich, itself.

Fish can get too “fancy”, breaking from standards and output formats, such as with “loops” and printing extraneous characters. I realize that this can be mitigated, more or less, by changing its configuration files. (Many a time while using Fish, I had to invoke a BASH shell, just to run a loop or copy the contents of an output, because Fish was “getting in the way”.)

I like Fish[1], but I just don’t see a strong argument for its inclusion as a shell in a NAS server that already provides ZSH.


  1. Fish, by far, from the shells I’ve tried, has the most intuitive “history” function. It’s not AI, but it feels very “smart”. (You thought I was going to make a fish pun, didn’t you?) ↩︎

The main use of the command line being to assist in diagnosing issues, I’m pretty sure it would not be good idea to add fishy behaviour in the mix.
Where you could spend time in the CLI is within sandboxes/jails/VMs; you can install anything you want in there.

(But I too like fish: I had ray for lunch.)

2 Likes

I second everything tacocat said. Fish is my daily driver, and every time I have to use any other shell, it feels archaic and wrong. I understand the issues with fish not being a POSIX shell and all that, but…I just really like it.

It’s sad to see that fish is still not available as an option.

I wonder if someone can request it as a feature?

This is the feature request, and apparently only 4 other people seem to need fish as an option…

1 Like

:rofl: Let’s see if I can find it to vote for it (if that’s an option at all).

It’s just that I got truenas up and running about 3-4 weeks ago, and I realized all the hoops I have to run through to get zsh to work the way I want it to, whereas fish just gives you all this cool stuff (e.g., auto completion) right out of the box.

EDIT: I just realized I’m in the feature request thread currently. VOTED!

1 Like

top side of this threads page is a big blue vote button :joy:

1 Like

I have to echo @etorix with the fact that the NAS Shell is meant for diagnostics and such. It is not a operating system that is expected to be played with. You have jails, VMs, LXCs, Dockers to use Fish with. I too doubt iXsystems would include it but you never know, hence why there is a feature request section.

I have not used Fish but I’m not opposed to its use. I might like it even. I will have to try it in a jail someday.

3 Likes

Pre-installing the fish package wouldn’t adversely impact anyone that doesn’t want to use it. I use Fish basically everywhere, except the TrueNAS console. When I find myself needing to dive into the console, one of the last things I want to do is fight with shell syntax. The extensive built-in auto-completion would make sysadmin tasks much nicer, as well.

I don’t really buy the argument that it shouldn’t be installed because you’re not supposed to actively use the shell. I don’t think anyone is using it for every day computing tasks. Making sysadmin harder to adhere to some platonic ideal of how the shell should be used seems unnecessary to me. Indeed, ZSH is already installed when Bash would suffice.

1 Like

I think it’s worth trying, especially since the package manager is “disabled” in TrueNAS.