Fish: Difference between revisions
PowerUser64 (talk | contribs) Add note about unicode space when copying code snippet -- I think this may be a bug in MediaWiki? |
|||
| (3 intermediate revisions by 3 users 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 162: | Line 164: | ||
dconf = { | dconf = { | ||
enable = true; | enable = true; | ||
settings."org/gnome/ | settings."org/gnome/Console" = { | ||
shell = [ " | shell = [ "fish" ]; | ||
}; | }; | ||
}; | }; | ||
| Line 174: | Line 176: | ||
Some users suffer from slow build due to fish enabling `documentation.man.generateCaches`. You may force false. | Some users suffer from slow build due to fish enabling `documentation.man.generateCaches`. You may force false. | ||
documentation.man.generateCaches = false'';'' | documentation.man.generateCaches = false'';'' | ||
For home-manager users, man cache need to be disabled in programs | |||
programs.man.generateCaches = false'';'' | |||
==== Running fish interactively with zsh as system shell on darwin ==== | ==== Running fish interactively with zsh as system shell on darwin ==== | ||
| Line 200: | 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.: | ||