zsh/darwin: don't print escape codes when piping from SSH
Alan Pearce alan@alanpearce.eu
Wed, 26 Oct 2022 14:53:51 +0200
1 files changed, 10 insertions(+), 5 deletions(-)
jump to
M user/zsh/zshrc.darwin → user/zsh/zshrc.darwin
@@ -10,11 +10,16 @@ server=$arg break fi done - set_title "file://${server}/" - command ssh "$@" - retval=$? - set_title - return $retval + if [[ ! -p /dev/fd/1 ]]; then + set_title "file://${server}/" + command ssh "$@" + retval=$? + set_title + return $retval + else + command ssh "$@" + return $retval + fi } mosh() { command mosh "$@"