# Read plugin ...
[[ -n "$AXZSH_DEBUG" ]] \
&& echo " - $plugin ($type) ..."
- source "$fname"
+
+ # 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 ...
+
+ case "$fname" in
+ *"/repos/"*)
+ axzsh_is_dumb_terminal || source "$fname"
+ ;;
+ *)
+ source "$fname"
+ esac
if [[ -n "$cache_file" ]]; then
# Add plugin data to cache
case "$fname" in
*"/repos/"*)
echo "[[ -n \"\$AXZSH_DEBUG\" ]] && echo ' - $plugin ($type): \"$fname\" ...'" >>$cache_file
- echo "source '$fname'" >>$cache_file
+ echo "axzsh_is_dumb_terminal || source '$fname'" >>$cache_file
;;
*)
echo "[[ -n \"\$AXZSH_DEBUG\" ]] && echo ' - $plugin ($type, cached) ...'" >>$cache_file
# AX-ZSH: Alex' Modular ZSH Configuration
# 90_theme.zshrc: Load AX-ZSH theme
+# 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
+ PS1="%n@%m:%3~ %# "
+ unset RPS1
+
+ # See <https://github.com/syl20bnr/spacemacs/issues/3035>
+ unset zle_bracketed_paste
+
+ return
+fi
+
# Read in the theme configuration.
[[ -n "$AXZSH_THEME" ]] && source "$AXZSH_THEME"
-
-# RPS1 will cause trouble on "dumb" terminals; so reset it there!
-axzsh_is_dumb_terminal && unset RPS1