]> arthur.barton.de Git - ax-zsh.git/blobdiff - core/90_theme/90_theme.zshrc
Fix handling of legacy terminal types
[ax-zsh.git] / core / 90_theme / 90_theme.zshrc
index 140c73aa968d7fbd398897c6e9cbdb0c97713dbf..7fb4301287afbc74a0a94755b38d23e5f6eba832 100644 (file)
@@ -4,12 +4,18 @@
 # Don't load any "enhanced" theme on dumb terminals, but instead use a very
 # simple and sane built-in prompt that should work "everywhere". And try to
 # make sure that nothing else "disturbs" such terminals ...
-if axzsh_is_dumb_terminal; then
-       unset AXZSH_THEME
+if ! axzsh_is_modern_terminal; then
+       if axzsh_is_dumb_terminal; then
+               # Don't use any theme on dumb terminals!
+               unset AXZSH_THEME
 
-       # Set simple prompt:
-       PS1="%n@%m:%3~ %# "
-       unset RPS1
+               # Set simple prompt:
+               PS1="%n@%m:%3~ %# "
+               unset RPS1
+       else
+               # Use the default theme on legacy ("not modern") terminals:
+               AXZSH_THEME="$AXZSH/themes/ax.axzshtheme"
+       fi
 
        # See <https://github.com/syl20bnr/spacemacs/issues/3035>
        unset zle_bracketed_paste