1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

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