From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13543 invoked by alias); 18 Jan 2016 17:34:33 -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: 21164 Received: (qmail 23604 invoked from network); 18 Jan 2016 17:34:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=rqOVroUNWt+CWxSKlQBPU6d/jUmuPMmSXDOcHMGUUmQ=; b=MviMm2r2rsKJc9ONw2QW5XFqZ/fPjt4w3O1tV7Vt6StFr6Ckzy7Upf9/BTciFsmoTg msMGG3Qq+ab4TKvVN6HpcAp1W4eoXFw64AcjKmo3eoBfzBd9MhsDVXZjzy0EXEQ1mneB QHo1TNtVgrJGm2vpddV9wHLr9F3QQl59lRQbRdhSfWwpdMR9sgEukUUJO/E7BVwFktHJ wQ4MRoer7AgCqd17g6eBTa9mGnaplmeOdEm0ZHdbYVYXOwhHN5KiZEY1wF5fAIloNEjz tOflIbDGFc73/NgDmAjigIJmOTSsdeJ18ysREPEFGYWu3i0K1p8mKN2e21DlsdbQzQxB 7LPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=rqOVroUNWt+CWxSKlQBPU6d/jUmuPMmSXDOcHMGUUmQ=; b=FUBdXExjmIR6rbxhZ15hJiegEWEY/NqoFj/nyoNJAykPD0Njy7E6ESzEMUNlp5vvD7 l5SSfUEiA96x2wj87+dXvdtG6qa1i/bcNuMT0mss2cUNapvp0MzdvpwS4k4jpcR2fTyu TVZh6oVaR4J87YFGjlvIL+EkGpv4fM4fRxJpOz0DmWCYz/UkdSai+PouYbP9g2uq8jqU Flo+izJxpzKS/eCZWw7O9giA3sWlglU9IMl9uunjdth9qt0MldbuaWcghQQecm3vjuQ5 vEQbviAb2xoLyY3UAdMhUKqnGpl+RAv2bvZ0uxz7h9bQIiHmNcif+O5mRZgnuYzuVjXg vlyg== X-Gm-Message-State: ALoCoQnqXieWfZeuLJ+QbalNJc8y+OzOoP4zCLzT8vGggRt/8pbm7Pqn3M6nloQMP9BLvZFs5CoLwj55yImPPOxB1JzRNLxYBQ== X-Received: by 10.98.17.193 with SMTP id 62mr36590315pfr.30.1453138470265; Mon, 18 Jan 2016 09:34:30 -0800 (PST) From: Bart Schaefer Message-Id: <160118093457.ZM6610@torch.brasslantern.com> Date: Mon, 18 Jan 2016 09:34:57 -0800 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Cancel zle -M on a keypress, use cursor keys" (Jan 18, 10:47am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Cancel zle -M on a keypress, use cursor keys MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 18, 10:47am, Sebastian Gniazdowski wrote: } } I've written a Zle completion widget that edits BUFFER and proposes } matches via zle -M. I want to cancel the zle -M message when user does } anything different than browsing completions (done with Alt-h and } Alt-H). How to accomplish this? [...] } I would also want to catch cursor keys and use them for browsing the } matches. How to do this, should I somehow use bindkey locally in the I think you want to invoke "zle recursive-edit" with its own private keymap. Refer to Functions/Zle/read-from-minibuffer for an example; you may even be able to use read-from-minibuffer directly. The other way is to use "read -k" in in a loop, for which the most detailed (though now fairly old and probably improvable) example is Functions/Zle/incremental-complete-word.