]> arthur.barton.de Git - ax-zsh.git/blob - core/90_theme/90_theme.zshrc
Fix handling of legacy terminal types
[ax-zsh.git] / core / 90_theme / 90_theme.zshrc
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # 90_theme.zshrc: Load AX-ZSH theme
3
4 # Don't load any "enhanced" theme on dumb terminals, but instead use a very
5 # simple and sane built-in prompt that should work "everywhere". And try to
6 # make sure that nothing else "disturbs" such terminals ...
7 if ! axzsh_is_modern_terminal; then
8         if axzsh_is_dumb_terminal; then
9                 # Don't use any theme on dumb terminals!
10                 unset AXZSH_THEME
11
12                 # Set simple prompt:
13                 PS1="%n@%m:%3~ %# "
14                 unset RPS1
15         else
16                 # Use the default theme on legacy ("not modern") terminals:
17                 AXZSH_THEME="$AXZSH/themes/ax.axzshtheme"
18         fi
19
20         # See <https://github.com/syl20bnr/spacemacs/issues/3035>
21         unset zle_bracketed_paste
22 fi
23
24 # NOTE: The theme itself is read in by the ax.zsh script itself: last and into
25 # the global context (code for the cache file is generated as required).