From cd3b658167f4ada7e3d2bcd57cb0ec361fffcb27 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 26 Jun 2023 12:37:10 -0600 Subject: [PATCH] starship: Remove INSIDE_EMACS checks (#239039) 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 https://www.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) --- nixos/modules/programs/starship.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/programs/starship.nix b/nixos/modules/programs/starship.nix index cacad8eafe3d..9dca39da5edc 100644 --- a/nixos/modules/programs/starship.nix +++ b/nixos/modules/programs/starship.nix @@ -43,21 +43,21 @@ in config = mkIf cfg.enable { programs.bash.${initOption} = '' - if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then + if [[ $TERM != "dumb" ]]; then export STARSHIP_CONFIG=${settingsFile} eval "$(${pkgs.starship}/bin/starship init bash)" fi ''; programs.fish.${initOption} = '' - if test "$TERM" != "dumb" -a \( -z "$INSIDE_EMACS" -o "$INSIDE_EMACS" = "vterm" \) + if test "$TERM" != "dumb" set -x STARSHIP_CONFIG ${settingsFile} eval (${pkgs.starship}/bin/starship init fish) end ''; programs.zsh.${initOption} = '' - if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then + if [[ $TERM != "dumb" ]]; then export STARSHIP_CONFIG=${settingsFile} eval "$(${pkgs.starship}/bin/starship init zsh)" fi