Starship: improve zsh terminal check (#1821)

Matches zsh's check with bash and fish, checking for a dumb terminal and
allowing vterm inside Emacs.
This commit is contained in:
Kevin Mullins 2021-02-23 10:51:27 -08:00 committed by GitHub
parent 7582090eb0
commit 0933fb8765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,7 @@ in {
'';
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
if [ -z "$INSIDE_EMACS" ]; then
if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
eval "$(${cfg.package}/bin/starship init zsh)"
fi
'';