From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19861 invoked by alias); 26 Jul 2013 19:39:48 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17893 Received: (qmail 21159 invoked from network); 26 Jul 2013 19:39:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 209.85.215.169 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-proxyuser-ip:date:from:to:subject:message-id:in-reply-to :references:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=0yidO7SOfZZvOu1qAMYgbRMnW3+LNVr0QPXk63G7OC0=; b=SPy6p5ZvaO5esfG2vsMAb6AiM9KIclIlS0EF/rzYpF0WNCXtc0/AZ+CpGw6M6k1mUf ivQwKswFS7x+Adkh/A0AJ0ZiJbFLi0SItxYTemVAZ3GT9la5lmA8wOeeqh5HQY8utPs+ jz/NPkU3Sodo6y8eXVcsdBAIb6nbv0VMHT4vJsR5027IvdSewUfiu42Xzganmnb85Ua/ lXVAwZLQC2kLFmO87geAt/nhoDEtGSNSw8hDeA+JjIAWwajw6iu4RqQivgX70lCuKKMC Zy2tlHb8ZHNLjP0q3YCgN2UtdTQZYkW2zvjqEXLpW6WSVIjWpmwi2n/DoB6M7tBUMNgN ihqQ== X-Received: by 10.14.104.9 with SMTP id h9mr14079202eeg.55.1374867575003; Fri, 26 Jul 2013 12:39:35 -0700 (PDT) X-ProxyUser-IP: 86.6.30.159 Date: Fri, 26 Jul 2013 20:39:31 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: print to the terminal in zle Message-ID: <20130726203931.3e05f151@pws-pc.ntlworld.com> In-Reply-To: <20130726134811.GA14136@chaz.gmail.com> References: <20130726134811.GA14136@chaz.gmail.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkmmYaafxHojIaRkZ+L6td4DQf6/+sRgSKbwXWCXgjfkQOg9Ovj62HnuALtbLdD7M73MCy3 On Fri, 26 Jul 2013 14:48:11 +0100 Stephane Chazelas wrote: > recently, Debian broke some of my scripts using ZLE in `zsh -i` by adding: > > function zle-line-init () { > emulate -L zsh > printf '%s' ${terminfo[smkx]} > } > > To /etc/zsh/zshrc > > That smkx escape sequence is printed to stdout instead of the terminal. It's just occurred to me that maybe zle special functions should be run with stdout and stdin set explicitly to the terminal. Arguably they have no business knowing about a redirected stdout or stdin since they run in a context where that's meaningless. stderr would be good enough for debugging. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/