powerline-go: add fish integration

This commit is contained in:
Vanilla 2021-08-03 11:16:00 +08:00 committed by Robert Helgesson
parent 7f976da068
commit ab6517d34a
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 51 additions and 0 deletions

View file

@ -140,5 +140,14 @@ in {
install_powerline_precmd
fi
'';
# https://github.com/justjanne/powerline-go#fish
programs.fish.promptInit =
mkIf (cfg.enable && config.programs.fish.enable) ''
function fish_prompt
eval ${pkgs.powerline-go}/bin/powerline-go -error $status -jobs (count (jobs -p)) ${commandLineArguments}
${cfg.extraUpdatePS1}
end
'';
};
}