mirror of
https://github.com/nix-community/home-manager
synced 2024-11-19 01:29:46 +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 ''
|
||||
if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
|
||||
if [[ $TERM != "dumb" ]]; then
|
||||
eval "$(${starshipCmd} init bash --print-full-init)"
|
||||
fi
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
|
||||
if [[ $TERM != "dumb" ]]; then
|
||||
eval "$(${starshipCmd} init zsh)"
|
||||
fi
|
||||
'';
|
||||
|
||||
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)
|
||||
${lib.optionalString cfg.enableTransience "enable_transience"}
|
||||
end
|
||||
'';
|
||||
|
||||
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)
|
||||
end
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue