Fish: Difference between revisions

m The dconf path and the fish command was incorrect. I have corrected the case to make it work.
Pigeon (talk | contribs)
 
(One intermediate revision by the same user not shown)
Line 136: Line 136:


Using fish as the the login shell can cause compatibility issues. For example, certain recovery environments such as systemd's emergency mode to be completely broken when fish was set as the login shell. This  limitation is noted on the [https://wiki.gentoo.org/wiki/Fish#Caveats Gentoo] wiki. There they present an alternative, keeping bash as the system shell but having it exec fish when run interactively.
Using fish as the the login shell can cause compatibility issues. For example, certain recovery environments such as systemd's emergency mode to be completely broken when fish was set as the login shell. This  limitation is noted on the [https://wiki.gentoo.org/wiki/Fish#Caveats Gentoo] wiki. There they present an alternative, keeping bash as the system shell but having it exec fish when run interactively.
{{Expansion}}


Here is one solution, which launches fish unless the parent process is already fish:
Here is one solution, which launches fish unless the parent process is already fish:
Line 204: Line 206:
)
)
</syntaxhighlight>
</syntaxhighlight>
{{Note|This won't work with the new {{ic|nix shell}} command, as it doesn't set {{ic|IN_NIX_SHELL}} variable. You can instead check if {{ic|$SHLVL}} is {{ic|> 1}}, or check if {{ic|$PATH}} contains paths from {{ic|/nix/store}} (which get added at the beginning of the {{ic|$PATH}} when you enter nix shell). See https://github.com/NixOS/nix/issues/6677 for more context and workarounds.}}


and <code>$nix_shell_info</code> to the echo in that function, e.g.:
and <code>$nix_shell_info</code> to the echo in that function, e.g.: