Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: comments in completion
- X-seq: zsh-workers 3616
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Stefan Monnier <monnier+lists/zsh/workers/news/@TEQUILA.SYSTEMSZ.CS.YALE.EDU>, zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: comments in completion
- Date: Sun, 16 Nov 1997 09:26:26 -0800
- In-reply-to: <5liutsx2qz.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- References: <5liutsx2qz.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author