From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23188 invoked by alias); 13 Mar 2014 16:19:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32481 Received: (qmail 10420 invoked from network); 13 Mar 2014 16:19:53 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140313091950.ZM14399@torch.brasslantern.com> Date: Thu, 13 Mar 2014 09:19:50 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Problem with "read -q" / "read -k" and "zle -I" MIME-version: 1.0 Content-type: text/plain; charset=us-ascii The "read -q" and "read -k N" builtins are supposed to work inside ZLE widgets, but when "zle -I" has been executed the read waits for a newline. # This works fine zle-line-finish() { read -q $'?\nAre you sure [n/y]? ' } zle -N zle-line-finish # This waits for a newline zle-line-finish() { zle -I read -q $'?\nAre you sure [n/y]? ' } zle -N zle-line-finish Note also that a newline is printed before the prompt with "zle -I". It's necessary to call "zle -I" *after* the read in order to get the display to update cleanly See zsh-users "zsh detects rm *" thread for shenanigans that this made necessary.