diff options
author | Alan Pearce | 2022-10-26 14:53:51 +0200 |
---|---|---|
committer | Alan Pearce | 2022-10-26 14:53:51 +0200 |
commit | 723c2134d51d9a07cc9fd5eb69d49b4b09412d65 (patch) | |
tree | c9e0ffe19ce2d2b63db6e70b336331e71dff4f17 | |
parent | 954178d627dadc8c106416f5ccbad49061e699a8 (diff) | |
download | nixfiles-723c2134d51d9a07cc9fd5eb69d49b4b09412d65.tar.lz nixfiles-723c2134d51d9a07cc9fd5eb69d49b4b09412d65.tar.zst nixfiles-723c2134d51d9a07cc9fd5eb69d49b4b09412d65.zip |
zsh/darwin: don't print escape codes when piping from SSH
-rw-r--r-- | user/zsh/zshrc.darwin | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/user/zsh/zshrc.darwin b/user/zsh/zshrc.darwin index 1b4ecc9b..c8f17a43 100644 --- a/user/zsh/zshrc.darwin +++ b/user/zsh/zshrc.darwin @@ -10,11 +10,16 @@ ssh() { 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 "$@" |