From: Alexander Barton Date: Wed, 17 Aug 2016 21:00:31 +0000 (+0200) Subject: Implement new axzsh_is_dumb_terminal() function, and use it X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=b4e675f5b92776a02e85023779db4e4a89670fc9;p=ax-zsh.git Implement new axzsh_is_dumb_terminal() function, and use it --- diff --git a/core/10_terminal/10_terminal.zshrc b/core/10_terminal/10_terminal.zshrc index e7c1eec..88b8f04 100644 --- a/core/10_terminal/10_terminal.zshrc +++ b/core/10_terminal/10_terminal.zshrc @@ -22,6 +22,14 @@ function axzsh_is_modern_terminal { return 1 } +# Test for "dumb" terminal +function axzsh_is_dumb_terminal { + axzsh_is_modern_terminal && return 1 + [[ "$TERM" = dumb* ]] && return 0 + [[ "$TERM" = "vt52" ]] && return 0 + return 1 +} + # Resize terminal window (when possible) function axzsh_resize_terminal { printf '\e[8;%d;%dt' "$2" "$1" @@ -89,6 +97,8 @@ function axzsh_terminal_title_preexec { preexec_functions+=(axzsh_terminal_title_preexec) +axzsh_is_dumb_terminal && return 0 + # Colors autoload -Uz colors diff --git a/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zshrc b/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zshrc index b1902ab..cdc4ed9 100644 --- a/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zshrc +++ b/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zshrc @@ -1,6 +1,8 @@ # AX-ZSH: Alex' Modular ZSH Configuration # zsh-syntax-highlighting.zshrc: Initialize "ZSH Syntax Highlighting" +axzsh_is_dumb_terminal && return 1 + for script ( "/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"