From e5a5b0c1e0cbd2a8eb3f30543e8891b8ca61d392 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Tue, 24 Jan 2017 22:27:09 -0700 Subject: [PATCH] Output only newlines in the pty --- src/async.zsh | 3 +++ zsh-autosuggestions.zsh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/async.zsh b/src/async.zsh index 0e29a3f..18dbb9d 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -12,6 +12,9 @@ _zsh_autosuggest_async_fetch_suggestion() { _zsh_autosuggest_async_suggestion_server() { emulate -R zsh + # Output only newlines (not carriage return + newline) + stty -onlcr + while IFS='' read -r -d $'\0' prefix; do # Kill last bg process kill -KILL %1 &>/dev/null diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index ff3f0ac..449e08d 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -489,6 +489,9 @@ _zsh_autosuggest_async_fetch_suggestion() { _zsh_autosuggest_async_suggestion_server() { emulate -R zsh + # Output only newlines (not carriage return + newline) + stty -onlcr + while IFS='' read -r -d $'\0' prefix; do # Kill last bg process kill -KILL %1 &>/dev/null