zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: mmc@maruska.dyndns.org (Michal Marus<ka), zsh-workers@sunsite.dk
Subject: Re: (backward-)kill-argument     (1/2 thanks  1/2 problem re-statement)
Date: Fri, 15 Mar 2002 16:39:00 +0000	[thread overview]
Message-ID: <1020315163900.ZM2296@candle.brasslantern.com> (raw)
In-Reply-To: <m2zo1996ga.fsf_-_@linux3.maruska.tin.it>

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
itself.

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
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2002-03-15 16:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13 16:42 (backward-)kill-argument Michal Maruška
2002-03-13 19:09 ` (backward-)kill-argument John Beppu
2002-03-13 20:23   ` (backward-)kill-argument -- reformulation of the problem Michal Maruška
2002-03-15  8:55 ` (backward-)kill-argument Sven Wischnowsky
2002-03-15 15:31   ` (backward-)kill-argument Bart Schaefer
2002-03-15 15:49     ` (backward-)kill-argument Bart Schaefer
2002-03-15 15:49     ` (backward-)kill-argument (1/2 thanks 1/2 problem re-statement) Michal Maruška
2002-03-15 16:39       ` Bart Schaefer [this message]
2002-03-18  8:41         ` Sven Wischnowsky
2002-03-18  8:36     ` (backward-)kill-argument Sven Wischnowsky

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=1020315163900.ZM2296@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=mmc@maruska.dyndns.org \
    --cc=zsh-workers@sunsite.dk \
    /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).