Jump to content

Talk:Fish

From Official NixOS Wiki

Suggested bashrc in Fish#Setting fish as default shell needs revision

This script seems to contain many unneeded parts, such as $BASH_EXECUTION_STRING and login_shell checks.

It also misses at least one needed safeguard: check if$SHLVL is greater than 1 or 2. Without it, nested nix-shell will not work correctly (since parent != fish check will not apply).

Seems like this script was initially adapted from ArchWiki Fish page. Right now i am working to clean up the corresponding section on ArchWiki.

Please, see https://wiki.archlinux.org/title/Fish#Modify_.bashrc_to_drop_into_fish and the respective Talk page there. There you'll find rationale for everything i've mentioned in this NixOS Wiki Talk page. Also you may check latest ArchWiki edit history for Fish page (I am also @Pigeon there).

Too many users copy-paste provided snippets from wiki without understanding how it works (i've done that myself). So i propose that make this script more accurate :-) Pigeon (talk) 18:40, 24 January 2026 (UTC)Reply