zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Stefan Monnier
	<monnier+lists/zsh/workers/news/@TEQUILA.SYSTEMSZ.CS.YALE.EDU>,
	zsh-workers@math.gatech.edu
Subject: Re: comments in completion
Date: Sun, 16 Nov 1997 09:26:26 -0800	[thread overview]
Message-ID: <971116092626.ZM19655@candle.brasslantern.com> (raw)
In-Reply-To: <5liutsx2qz.fsf@tequila.systemsz.cs.yale.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 <num>  - show <num> lines of context after match
B <num>  - show <num> lines of context before match
<num>    - show <num> 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 <file> - read expressions from file <fil>
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


  reply	other threads:[~1997-11-16 17:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-16 15:44 Stefan Monnier
1997-11-16 17:26 ` Bart Schaefer [this message]
1997-11-17 13:54   ` Bruce Stephens
1997-11-17 15:45     ` Bart Schaefer
1997-11-17 16:26       ` Bruce Stephens
1997-11-17 17:13         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=971116092626.ZM19655@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=monnier+lists/zsh/workers/news/@TEQUILA.SYSTEMSZ.CS.YALE.EDU \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).