mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 08:09:45 +01:00
starship: Remove INSIDE_EMACS checks when enabling shell integration (#4135)
Many of the terminals supported inside emacs work perfectly fine with STARSHIP. The TERM=dumb case already handles the tramp and eterm cases, so as far as I can tell, this is basically just a check for the benefit of OLD versions of term-mode (see emacswiki.org/emacs/AnsiTerm#:~:text=Historically%2C%20'M%2Dx%20ansi%2Dterm,the%20older%20'C%2Dc'%20binding., which indicates that it also now handles colors).
This commit is contained in:
parent
1fefd7bb8d
commit
29358e8be7
1 changed files with 4 additions and 4 deletions
|
@ -100,26 +100,26 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||||
if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
|
if [[ $TERM != "dumb" ]]; then
|
||||||
eval "$(${starshipCmd} init bash --print-full-init)"
|
eval "$(${starshipCmd} init bash --print-full-init)"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||||
if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
|
if [[ $TERM != "dumb" ]]; then
|
||||||
eval "$(${starshipCmd} init zsh)"
|
eval "$(${starshipCmd} init zsh)"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||||
if test "$TERM" != "dumb" -a \( -z "$INSIDE_EMACS" -o "$INSIDE_EMACS" = "vterm" \)
|
if test "$TERM" != "dumb"
|
||||||
eval (${starshipCmd} init fish)
|
eval (${starshipCmd} init fish)
|
||||||
${lib.optionalString cfg.enableTransience "enable_transience"}
|
${lib.optionalString cfg.enableTransience "enable_transience"}
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.ion.initExtra = mkIf cfg.enableIonIntegration ''
|
programs.ion.initExtra = mkIf cfg.enableIonIntegration ''
|
||||||
if test $TERM != "dumb" && not exists -s INSIDE_EMACS || test $INSIDE_EMACS = "vterm"
|
if test $TERM != "dumb"
|
||||||
eval $(${starshipCmd} init ion)
|
eval $(${starshipCmd} init ion)
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue