From: Mark Wooding Date: Sat, 25 Apr 2020 01:21:03 +0000 (+0100) Subject: dot/shell-rc: Write the various control sequences to the terminal explicitly. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/83aea396d0a1140dc32c15ec54f5f17b0985fb9e dot/shell-rc: Write the various control sequences to the terminal explicitly. --- diff --git a/dot/shell-rc b/dot/shell-rc index 0b6e94b..55a245f 100644 --- a/dot/shell-rc +++ b/dot/shell-rc @@ -146,11 +146,11 @@ __mdw_set_prompt () { esac } -__mdw_xterm_precmd () { printf "]2;%s@%s:%s – %s\\" "$USER" "$__mdw_host" "$PWD" "$__mdw_shell"; } -__mdw_xterm_preexec () { printf "]2;%s@%s:%s – %s\\" "$USER" "$__mdw_host" "$PWD" "$1"; } +__mdw_xterm_precmd () { printf >/dev/tty "]2;%s@%s:%s – %s\\" "$USER" "$__mdw_host" "$PWD" "$__mdw_shell"; } +__mdw_xterm_preexec () { printf >/dev/tty "]2;%s@%s:%s – %s\\" "$USER" "$__mdw_host" "$PWD" "$1"; } -__mdw_screen_precmd () { printf "k%s\\" "$__mdw_shell"; } -__mdw_screen_preexec () { printf "k%s\\" "$1"; } +__mdw_screen_precmd () { printf >/dev/tty "k%s\\" "$__mdw_shell"; } +__mdw_screen_preexec () { printf >/dev/tty "k%s\\" "$1"; } if [ -t 0 ]; then case ${STY+t},${__mdw_precmd_hook+t},${__mdw_preexec_hook+t},${TERM} in