1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

starship: allow running in Emacs if vterm is used

The vterm buffer is backed by libvterm and can handle Starship prompts
without issues.
This commit is contained in:
Robert Helgesson 2020-05-15 22:53:26 +02:00
parent db6e261794
commit 69f8e47e9e
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -89,7 +89,7 @@ in {
mkIf (cfg.settings != { }) { source = configFile cfg.settings; }; mkIf (cfg.settings != { }) { source = configFile cfg.settings; };
programs.bash.initExtra = mkIf cfg.enableBashIntegration '' programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
if [[ $TERM != "dumb" && -z $INSIDE_EMACS ]]; then if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
eval "$(${cfg.package}/bin/starship init bash)" eval "$(${cfg.package}/bin/starship init bash)"
fi fi
''; '';