zsh: reduce config if TERM == dumb

Fixes TRAMP hangs when connecting to some machines
This commit is contained in:
Henrik Lissner 2019-12-10 14:51:47 -05:00
parent e74fb44280
commit 60e3a4abaa
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 45 additions and 38 deletions

View file

@ -16,8 +16,9 @@ if ! zgen saved; then
zgen save
fi
source $ZDOTDIR/prompt.zsh
source $ZDOTDIR/config.zsh
if [[ $TERM != dumb ]]; then
source $ZDOTDIR/prompt.zsh
source $ZDOTDIR/keybinds.zsh
source $ZDOTDIR/completion.zsh
source $ZDOTDIR/aliases.zsh
@ -57,3 +58,4 @@ autopair-init
# If you have host-local configuration, this is where you'd put it
[ -f ~/.config/zsh/rc ] && source ~/.config/zsh/rc
fi

View file

@ -1,6 +1,11 @@
# Stop term/shell echoing back my input
if [[ -n $INSIDE_EMACS ]]; then
# Stop TRAMP (in Emacs) from hanging or term/shell from echoing back commands
if [[ $TERM == dumb || -n $INSIDE_EMACS ]]; then
unsetopt zle
unsetopt prompt_cr
unsetopt prompt_subst
whence -w precmd >/dev/null && unfunction precmd
whence -w preexec >/dev/null && unfunction preexec
PS1='$ '
fi
## General