mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
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)
This commit is contained in:
parent
77f7192d76
commit
cd3b658167
1 changed files with 3 additions and 3 deletions
|
@ -43,21 +43,21 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.bash.${initOption} = ''
|
programs.bash.${initOption} = ''
|
||||||
if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
|
if [[ $TERM != "dumb" ]]; then
|
||||||
export STARSHIP_CONFIG=${settingsFile}
|
export STARSHIP_CONFIG=${settingsFile}
|
||||||
eval "$(${pkgs.starship}/bin/starship init bash)"
|
eval "$(${pkgs.starship}/bin/starship init bash)"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.fish.${initOption} = ''
|
programs.fish.${initOption} = ''
|
||||||
if test "$TERM" != "dumb" -a \( -z "$INSIDE_EMACS" -o "$INSIDE_EMACS" = "vterm" \)
|
if test "$TERM" != "dumb"
|
||||||
set -x STARSHIP_CONFIG ${settingsFile}
|
set -x STARSHIP_CONFIG ${settingsFile}
|
||||||
eval (${pkgs.starship}/bin/starship init fish)
|
eval (${pkgs.starship}/bin/starship init fish)
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.zsh.${initOption} = ''
|
programs.zsh.${initOption} = ''
|
||||||
if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
|
if [[ $TERM != "dumb" ]]; then
|
||||||
export STARSHIP_CONFIG=${settingsFile}
|
export STARSHIP_CONFIG=${settingsFile}
|
||||||
eval "$(${pkgs.starship}/bin/starship init zsh)"
|
eval "$(${pkgs.starship}/bin/starship init zsh)"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue