Disable plugins/code requiring current terminal features not only on
"dumb" terminals, but on legacy ("not modern") terminals, too. This is
handled by using the axzsh_is_modern_terminal() function insetad of
axzsh_is_dumb_terminal().
And fix plugins to return 91 ("ignore") as result code in this case.
In addition, disable theming only on dumb terminals (as before), but
fall back to the standard "ax" theme on non-modern terminals, too!
[[ -n "$AXZSH_DEBUG" ]] \
&& echo " - $plugin ($type) ..."
[[ -n "$AXZSH_DEBUG" ]] \
&& echo " - $plugin ($type) ..."
- # Note for "external" ("repo/*") plugins and "dumb" terminals:
- # These (modern?) plugins most probably don't expect such an
- # unusual old terminal configuration and don't behave well
- # (echo color sequences, for example). Therefore we DON'T load
- # any external plugins at all when running on such a terminal:
- # this results in reduced/disabled functionality, but hopefully
- # in readable output ...
+ # Note for "external" ("repo/*") plugins and unusual ("not so
+ # modern") terminals: These (modern?) plugins most probably
+ # don't expect such a terminal configuration and don't behave
+ # well (echo color sequences, for example). Therefore we DON'T
+ # load any external plugins at all in that case: this results in
+ # reduced/disabled functionality, but hopefully in readable
+ # output ...
case "$fname" in
*"/repos/"*)
case "$fname" in
*"/repos/"*)
- axzsh_is_dumb_terminal || source "$fname"
+ axzsh_is_modern_terminal && source "$fname"
case "$fname" in
*"/repos/"*)
echo "[[ -n \"\$AXZSH_DEBUG\" ]] && echo ' - $plugin ($type): \"$fname\" ...'" >>$cache_file
case "$fname" in
*"/repos/"*)
echo "[[ -n \"\$AXZSH_DEBUG\" ]] && echo ' - $plugin ($type): \"$fname\" ...'" >>$cache_file
- echo "axzsh_is_dumb_terminal || source '$fname'" >>$cache_file
+ echo "axzsh_is_modern_terminal && source '$fname'" >>$cache_file
;;
*)
echo "[[ -n \"\$AXZSH_DEBUG\" ]] && echo ' - $plugin ($type, cached) ...'" >>$cache_file
;;
*)
echo "[[ -n \"\$AXZSH_DEBUG\" ]] && echo ' - $plugin ($type, cached) ...'" >>$cache_file
autoload -Uz colors
colors
autoload -Uz colors
colors
-fg[default]="\e[39m"
-bg[default]="\e[49m"
+if axzsh_is_modern_terminal; then
+ fg[default]="\e[39m"
+ bg[default]="\e[49m"
+else
+ fg[default]="\e[37m"
+ bg[default]="\e[47m"
+fi
# Foreground (FG) and background (BG) colors.
typeset -Ag FG BG
# Foreground (FG) and background (BG) colors.
typeset -Ag FG BG
# 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 ...
# 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
# See <https://github.com/syl20bnr/spacemacs/issues/3035>
unset zle_bracketed_paste
# AX-ZSH: Alex' Modular ZSH Configuration
# fzf.zshrc: Setup Git
# AX-ZSH: Alex' Modular ZSH Configuration
# fzf.zshrc: Setup Git
+axzsh_is_modern_terminal || return 91
+
# Test for local fzf installation ...
if [[ -r ~/.fzf.zsh ]]; then
source ~/.fzf.zsh
# Test for local fzf installation ...
if [[ -r ~/.fzf.zsh ]]; then
source ~/.fzf.zsh
[[ -z "$AXZSH_PLUGIN_CHECK" ]] || return 92
# Check prerequisites ...
[[ -z "$AXZSH_PLUGIN_CHECK" ]] || return 92
# Check prerequisites ...
-axzsh_is_dumb_terminal && return 91
+axzsh_is_modern_terminal || return 91
[[ -o interactive ]] || return 91
[[ -z "$ITERM_SHELL_INTEGRATION_INSTALLED" ]] || return 91
[[ "$TERM" != "screen" && "$TERM" != "screen-256color" ]] || return 91
[[ -o interactive ]] || return 91
[[ -z "$ITERM_SHELL_INTEGRATION_INSTALLED" ]] || return 91
[[ "$TERM" != "screen" && "$TERM" != "screen-256color" ]] || return 91
# AX-ZSH: Alex' Modular ZSH Configuration
# powerline-shell.zshrc: "powerline-shell" integration.
# AX-ZSH: Alex' Modular ZSH Configuration
# powerline-shell.zshrc: "powerline-shell" integration.
-[[ "$TERM" = "linux" ]] && return 911
+axzsh_is_modern_terminal || return 91
if [[ -z "$POWERLINE_SHELL" ]]; then
for p (
if [[ -z "$POWERLINE_SHELL" ]]; then
for p (
# AX-ZSH: Alex' Modular ZSH Configuration
# zsh-autosuggestions.zshrc: Initialize "Fish-like autosuggestions for zsh"
# AX-ZSH: Alex' Modular ZSH Configuration
# zsh-autosuggestions.zshrc: Initialize "Fish-like autosuggestions for zsh"
-axzsh_is_dumb_terminal && return 1
+axzsh_is_modern_terminal || return 91
for script (
"/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
for script (
"/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
# AX-ZSH: Alex' Modular ZSH Configuration
# zsh-syntax-highlighting.zshrc: Initialize "ZSH Syntax Highlighting"
# AX-ZSH: Alex' Modular ZSH Configuration
# zsh-syntax-highlighting.zshrc: Initialize "ZSH Syntax Highlighting"
-axzsh_is_dumb_terminal && return 1
+axzsh_is_modern_terminal || return 91
for script (
"/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
for script (
"/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"