Zsh Mailing List Archive
Messages sorted by:
Re: (backward-)kill-argument (1/2 thanks 1/2 problem re-statement)
- X-seq: zsh-workers 16843
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: mmc@xxxxxxxxxxxxxxxxxx (Michal Marus<ka), zsh-workers@xxxxxxxxxx
- Subject: Re: (backward-)kill-argument (1/2 thanks 1/2 problem re-statement)
- Date: Fri, 15 Mar 2002 16:39:00 +0000
- In-reply-to: <m2zo1996ga.fsf_-_@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <m2zo1cxvvl.fsf@xxxxxxxxxxxxxxxxxxxxx> <15505.46831.979708.369781@xxxxxxxxxxxxxxxxxx> <m2ofhsw728.fsf_-_@xxxxxxxxxxxxxxxxxxxxx> <1020315153147.ZM2228@xxxxxxxxxxxxxxxxxxxxxxx> <m2zo1996ga.fsf_-_@xxxxxxxxxxxxxxxxxxxxx>
On Mar 15, 4:49pm, Michal Marus<ka wrote:
} I immagine Zsh keeps a database (roughly) like:
No, zsh keeps no database. The syntax of every command is described by
a "completion function" which is written for that specific command.
There are a few other functions that describe generic types of syntax
that can be shared by many commands, but ultimately the only "database"
that zsh uses is a hash mapping a context (either a command name, or
something like -redirect- for what follows a redirection operator) to
a function that computes the completions for that context.
There is nothing that describes the syntax to the editor for purposes of
reversing this mapping, so the editor can't use the "knowledge" that the
completion system has of individual command contexts to perform syntactic
analysis of the edited text. It only has access to the generic parsing
rules of the (extended) Bourne shell scripting language used by the shell
Something like what you describe could be created in the same way that
the completion system itself was created -- built up one function at a time
for all the possible contexts that you want to recognize and operate on --
but it does not currently exist.
Bart Schaefer Brass Lantern Enterprises
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: