fish cleanup
This commit is contained in:
parent
b8a3586a4e
commit
ccc0994dfd
2 changed files with 10 additions and 12 deletions
|
@ -1,10 +1,4 @@
|
|||
# Set up path
|
||||
fish_add_path --path --prepend '@bat@/bin'
|
||||
fish_add_path --path --prepend '@eza@/bin'
|
||||
|
||||
# Abbreviations
|
||||
## misc
|
||||
abbr --add --global -- vim hx
|
||||
## nix
|
||||
abbr --add --global -- ns 'nix shell'
|
||||
abbr --add --global -- nss 'nix search'
|
||||
|
|
|
@ -4,18 +4,22 @@
|
|||
...
|
||||
}: {
|
||||
# TODO: Fix once https://github.com/viperML/wrapper-manager/issues/14 is resolved
|
||||
wrappers.fish = let
|
||||
inherit (pkgs) runCommandNoCC;
|
||||
in {
|
||||
basePackage = runCommandNoCC "fish-binary" {} ''
|
||||
wrappers.fish = {
|
||||
basePackage = pkgs.runCommandNoCC "fish-binary" {} ''
|
||||
install -D -m555 ${lib.getExe pkgs.fish} "$out/bin/fish"
|
||||
'';
|
||||
extraWrapperFlags = "--inherit-argv0";
|
||||
|
||||
prependFlags = let
|
||||
extraPkgs = with pkgs; [eza bat];
|
||||
# Can't use pathAdd because fish used as login shell will ignore the variables the wrapper sets up
|
||||
config-fish = runCommandNoCC "config.fish" { inherit (pkgs) bat eza; } ''
|
||||
substituteAll ${./config.fish} "$out"
|
||||
path-add-lines =
|
||||
lib.concatMapStringsSep "\n"
|
||||
(pkg: "fish_add_path --path --prepend '${lib.getExe' pkg ""}'")
|
||||
extraPkgs;
|
||||
config-fish = pkgs.writeText "config.fish" ''
|
||||
${path-add-lines}
|
||||
source ${./config.fish}
|
||||
'';
|
||||
in [
|
||||
"-C"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue