Fish: Difference between revisions
imported>Legendofmiracles adds a bit of examples of how to configure fish with home-manager |
imported>Legendofmiracles m fixed the small mess i created ;-; |
||
Line 23: | Line 23: | ||
Then you can add new ones by adding them to the list of submodules of <code>programs.fish.plugins</code>. So for example for the plugin <code>z</code> from jethrokuan on github. | Then you can add new ones by adding them to the list of submodules of <code>programs.fish.plugins</code>. So for example for the plugin <code>z</code> from jethrokuan on github. | ||
< | <syntaxhighlight lang="nix"> | ||
programs.fish.enable = true; | programs.fish.enable = true; | ||
programs.fish.plugins = [{ | programs.fish.plugins = [{ | ||
name = "z"; | name = "z"; | ||
Line 34: | Line 34: | ||
}; | }; | ||
}]; | }]; | ||
</ | </syntaxhighlight> | ||
== Useful scripts == | == Useful scripts == | ||
Line 63: | Line 62: | ||
=== Environments === | === Environments === | ||
Helper functions that put you in a nix-shell with the given packages installed. You can either put these in <code>programs.fish. | Helper functions that put you in a nix-shell with the given packages installed. | ||
You can either put these in <code>programs.fish.functions</code> with home-manager or in <code>~/.config/fish/functions/fish_prompt.fish</code> without. | |||
==== haskellEnv ==== | ==== haskellEnv ==== | ||
Line 76: | Line 77: | ||
==== pythonEnv ==== | ==== pythonEnv ==== | ||
<syntaxhighlight lang="fish"> | <syntaxhighlight lang="fish"> | ||
function pythonEnv --description 'start a nix-shell with the given python packages' --argument pythonVersion | function pythonEnv --description 'start a nix-shell with the given python packages' --argument pythonVersion |