1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-28 17:27:28 +02: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:
Ivan Malison 2023-06-22 02:14:49 -06:00 committed by GitHub
parent 1fefd7bb8d
commit 29358e8be7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
'';