]> arthur.barton.de Git - ax-zsh.git/blobdiff - core/11_terminal/11_terminal.zshrc
11_terminal: Fix shellcheck(1) warning
[ax-zsh.git] / core / 11_terminal / 11_terminal.zshrc
index b90fbc531305557675c2edf2696a1d6fef0f2c6f..f26a13195e8be2689350169d138538587eec6273 100644 (file)
@@ -26,6 +26,7 @@ function axzsh_is_modern_terminal {
        [[ "$TERM" = screen* ]] && return 0
        [[ "$TERM" = tmux* ]] && return 0
        [[ "$TERM" = xterm* ]] && return 0
+       [[ "$TERM" = cygwin ]] && return 0
        return 1
 }
 
@@ -97,9 +98,11 @@ function axzsh_terminal_title_preexec {
 
        axzsh_terminal_set_icon_title "$cmd"
 
-       [[ -z "$remote" ]] \
-               && axzsh_terminal_set_window_title "$LOGNAME@$SHORT_HOST$TITLE_ADD" \
-               || axzsh_terminal_set_window_title "$1"
+       if [[ -z "$remote" ]]; then
+               axzsh_terminal_set_window_title "$LOGNAME@$SHORT_HOST$TITLE_ADD"
+       else
+               axzsh_terminal_set_window_title "$1"
+       fi
 }
 
 preexec_functions+=(axzsh_terminal_title_preexec)