From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1498 invoked from network); 4 Aug 1998 21:40:53 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Aug 1998 21:40:53 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id RAA18219; Tue, 4 Aug 1998 17:35:16 -0400 (EDT) Resent-Date: Tue, 4 Aug 1998 17:35:16 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980804143711.ZM10224@candle.brasslantern.com> Date: Tue, 4 Aug 1998 14:37:11 -0700 In-Reply-To: =?iso-8859-1?Q?=3C35C757A9=2EBD4F645E=40bigfoot=2Ecom=3E?= =?iso-8859-1?Q?Comments=3A_In_reply_to_=22Johan_Sundstr=F6m=22_=3Cjohan_s?= =?iso-8859-1?Q?undstrom=40bigfoot=2Ecom=3E?= =?iso-8859-1?Q?________=22ideas=3A_free-search-complete=2C_noexpand=22_?= =?iso-8859-1?Q?=28Aug__4=2C__8=3A49pm=29?= References: <35C757A9.BD4F645E@bigfoot.com> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: johan_sundstrom@bigfoot.com, zsh-workers@math.gatech.edu Subject: Re: ideas: free-search-complete, noexpand MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by math.gatech.edu id RAA18204 Resent-Message-ID: <"QXOKc2.0.cS4.Jwtnr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4266 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 4, 8:49pm, Johan Sundström wrote: > Subject: ideas: free-search-complete, noexpand > > Wouldn't it be really nice if there was a completion mechanism that > wasn't locked to complete from the beginning of your word only, but > instead would find "mark_dirs" from a larger list of possible > completions, given the string "dir"? It's called "globcomplete": zsh% setopt globcomplete automenu zsh% setopt *dir* zsh% setopt autonamedirs zsh% setopt hashdirs zsh% setopt markdirs > I'd love this one --- am I the only one who always seems to remember > parts of filenames that aren't their first characters? :-/ Yup, you seem to want globcomplete. > ...and how come there is a 'noglob' command, but no 'nohist', 'noexpand' You can get nohist with `!"': zsh% !" say Hi!!! It's been a while, now! However, you can't do that in an alias. In fact, none of this works for history because history is expanded at lex time, and "noglob" et. al. are recognized and aliases expanded at parse time. The "history expansion" during lexing of `!"' is what "quotes" the rest of the `!' on the line. As far as I can tell, "noexpand" would be the same as single-quoting the entire line (which in recent versions of zsh is also sufficient to stop history from expanding), except for word breaking. It is technically feasible to create a precommand to do this, except for history, but there is a similar shortcut already. Have you tried using ESC-" or ESC-' at all? Those are bound to quote-region and quote-line, respectively. For example: zsh% say "It's a pain in the *ss", he thought to himself. ^ set mark here, then C-e ESC " and you get: zsh% say '"It'\''s a pain in the *ss", he thought to himself.'