News for hackers. Stuff that matters.
Re:Fish Shell 3.2 by SAI_Peregrinus on Monday March 01, 2021 @10:15AM (#26303477)
I think Fish is an excellent interactive shell. I've still got Bash as my default shell for non-interactive sessions, but I configured Konsole to start Fish by default for interactive use (Settings->Command, set to the path to the fish executable). That way scripts that need Bash still work, but I get a sane environment for interaction. For "portable" scripts I write POSIX shell, C, or Python, depending on what I need to be portable to.

fish_add_path will solve one of the few annoying things about Fish.

I've been looking at trying Oil as a Bash replacement though, I think Oil for scripting + Fish for interaction might be a best-of-both-worlds setup.

Re:Fish Shell 3.2 by mixmastamyk on Monday March 01, 2021 @01:24PM (#26306101)
Shebangs direct scripts to the right interpreter. Setting a default interactive shell won’t override it.
Re:Fish Shell 3.2 by SAI_Peregrinus on Tuesday March 02, 2021 @01:04PM (#26318252)
True, but there do exist (crappy) scrips with incorrect shebangs. EG specifying `#!/bin/sh` when they should use `#!/usr/bin/env bash`, since `/bin/sh` isn't necessarily bash. Could be dash. Could be fish. Could be oil. Etc.)
Re:Fish Shell 3.2 by geoelectric on Wednesday March 03, 2021 @12:43PM (#26331829)
I think /bin/sh is required to be a POSIX shell, at least when invoked with that name, and fish wouldn’t qualify.
Re:Fish Shell 3.2 by ComputerGuru on Monday March 01, 2021 @10:20AM (#26303531)
Fwiw fish_add_path doesn’t fundamentally change anything, users do get confused between global and universal variables and how they interact with exported variables like PATH, so this just makes it friendlier.
Re:Fish Shell 3.2 by SAI_Peregrinus on Monday March 01, 2021 @06:16PM (#26309842)
It also helps prevent duplicate path entries. I'd written an "add_to_path_if_not_present" function, but "fish_add_path" should do the same thing. It's just convenience, but Fish is largely about convenience.
Re:Fish Shell 3.2 by berlinquin on Monday March 01, 2021 @12:40PM (#26305524)
Thanks for sharing. I have a debian box that I try keep as standard as possible, and I think this setup would fit my environment well.