From: Michael Prokop Date: Tue, 12 Feb 2019 14:48:33 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/github/pr/73' X-Git-Tag: v0.16.0~3 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=b6488036e4c060e7f186212eeed148c2996abc2a;hp=9b0167b4b6fdc6782b2b7c35d5a09280ef6ace29;p=grml-etc-core.git Merge remote-tracking branch 'origin/github/pr/73' C/P from https://github.com/grml/grml-etc-core/pull/73: | Starting with zsh version 5.1, ZLE began supporting "bracketed paste mode". | | Currently, even on dumb terminals, ZLE sometimes emits the escape sequence | "[?2004h" after the prompt if bracketed paste mode is not disabled. This | prevents various tools that try to detect a shell prompt (such as Emacs TRAMP) | from doing so successfully. (The shell prompt effectively becomes user@host ~ % | �[?2004h – which typically will not be matched by prompt detecting regexps, | thereby breaking Emacs TRAMP for target hosts that use the Grml zsh config and | zsh ≥5.1.) | | Since most "dumb" terminals do not have bracketed paste capabilities anyway, | this pull request changes the Grml zsh config to disable bracketed paste mode | for "dumb" terminals. --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 8a66912..21db9e7 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -3733,6 +3733,9 @@ if check_com -c hg ; then fi # end of check whether we have the 'hg'-executable +# disable bracketed paste mode for dumb terminals +[[ "$TERM" == dumb ]] && unset zle_bracketed_paste + # grml-small cleanups and workarounds # The following is used to remove zsh-config-items that do not work