From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21527 invoked from network); 16 Nov 1997 17:41:47 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 16 Nov 1997 17:41:47 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id MAA21039; Sun, 16 Nov 1997 12:26:25 -0500 (EST) Resent-Date: Sun, 16 Nov 1997 12:26:25 -0500 (EST) From: "Bart Schaefer" Message-Id: <971116092626.ZM19655@candle.brasslantern.com> Date: Sun, 16 Nov 1997 09:26:26 -0800 In-Reply-To: <5liutsx2qz.fsf@tequila.systemsz.cs.yale.edu> Comments: In reply to Stefan Monnier "comments in completion" (Nov 16, 10:44am) References: <5liutsx2qz.fsf@tequila.systemsz.cs.yale.edu> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Stefan Monnier , zsh-workers@math.gatech.edu Subject: Re: comments in completion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"aVmmI1.0.g85.1poRq"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3616 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 16, 10:44am, Stefan Monnier wrote: } Subject: comments in completion } } What we really want is a way to put annotations that are understood by the } completion mechanism, so that they are printed when listing alternatives, } but they are not added to the command line. Isn't that what compctl -X is for? compctl -P - -X 'A - show lines of context after match B - show lines of context before match - show lines of context before and after match C - show 2 lines of context before and after match E - extended regular expression (egrep) F - fixed string expression (fgrep) G - basic regular expression (grep) L - print only the names of files that do NOT have a match V - print version number b - prefix output with byte offset of each line c - print only a count of matching lines h - do not prefix lines with file names i - case insensitive match l - print only the names of files that have a match n - prefix output with line number of each line q - print nothing (set exit status only) s - do not print error messages v - select lines that DO NOT match the expression w - match expression against whole words only x - match expression against whole lines only f - read expressions from file e - expression follows' \ -k '(A B C E F G L V b c e f h i l n q s v w x)' grep } This would come in handy for all completion of numbers like job numbers, } process ids, ... The problem with job numbers and process IDs is that you have to generate the explanation on the fly. Maybe what we need is a way to run a function to provide the -X output, rather than having only a fixed string. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com