From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20120 invoked by alias); 24 Jan 2012 11:53:14 -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: 16743 Received: (qmail 5226 invoked from network); 24 Jan 2012 11:53:00 -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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.12 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Yuri D'Elia Subject: Re: "Literal" command execution Date: Tue, 24 Jan 2012 12:52:39 +0100 Message-ID: <20120124125239.a797a3f4e63d9e5b3fa04f3d@users.sf.net> References: <20120123205150.27077e4eea9d7be1e632508f@users.sf.net> <120123143209.ZM29426@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: bgx-irt.net.eurac.edu X-Newsreader: Sylpheed 3.2.0beta5 (GTK+ 2.24.8; x86_64-pc-linux-gnu) On Mon, 23 Jan 2012 14:32:09 -0800 Bart Schaefer wrote: > Have a look at Functions/Zle/url-quote-magic, which relies on being able > to substitute itself for the self-insert ZLE builtin. You can skip over > the introductory comments about zstyles and focus on the function at the > end of the file, particularly the way it analyzes $KEYS and modifies > $LBUFFER. Thank you Bart (and also Damien) for this suggestion. This is indeed a step in the right direction. > A difficulty with this technique is that it becomes difficult to cascade > it with other similar techniques; ZLE doesn't have emacs' concept of > "advice" around a keybinding. I think I can simplify it a lot, by basically escaping everything unless it already starts in quotes. I'm just missing this: can I substitute self-insert just for a specific zstyle? This way I could make it work just for a specific command?