From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Generating completion functions from XML
Date: Thu, 19 Jul 2001 15:48:54 +0000 [thread overview]
Message-ID: <1010719154854.ZM4013@candle.brasslantern.com> (raw)
In-Reply-To: <200107190856.KAA08273@beta.informatik.hu-berlin.de>
On Jul 19, 10:56am, Sven Wischnowsky wrote:
} Subject: Re: Generating completion functions from XML
}
} Felix Rosencrantz wrote:
}
} > So I feared having to look at partially wrong _arguments calls. That
} > command has a lot of syntactic sugar and there is more on the way (e.g.
} > recent changes). It's not easy for me to remember what each special
} > character and grouping does.
}
} Actually, the reason why some of the _argument calls hurt the eyes is
} that it has so littly syntactic sugar.
}
} > It occurred to me that having an intermediate file format would be a
} > good idea. Possibly something that would be a little more descriptive,
} > maybe even interspersed with comments and documentation (both from
} > zsh & the command). Also it should be easier to edit. Also, it
} > should make it easier to specify commands that have subcommands (e.g.
} > cvs). There would need to be a tool which transform this intermediate
} > file format into the appropriate completion function, generating the
} > appropriate call to _arguments, _values, etc. Also, as the syntax to
} > _arguments changed it would be possible to change this generation tool,
} > and then regenerate the completion function. Maybe even _arguments
} > could even take this intermediate format file as input.
}
} Btw. have you noticed Bart's _arg_compile function?
I haven't updated _arg_compile in quite some time; I'm not sure that it
still produces good _arguments calls.
Another possible output format for a more sugary input language may be
Tanaka's _regex_arguments, which presently is used only for the `xset'
and `xwit' commands and the Debian `apt' family of commands. It might
be possible to produce better completions for many commands by using
_regex_arguments, but I confess that trying to comprehend that regex
syntax has always exceeded my available time or attention span.
} I'm not opposed to defining some language to make describing commands
} easier at all. Be it XML or something else (everything has to be XML
} nowadays, right? at least until the next hype... ;-).
That pretty much sums up my feeling about XML. I have yet to find an
editor that makes XML easier to edit than shell code. Maybe I just
haven't tried a recent enough version of emacs, or something.
--
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
next prev parent reply other threads:[~2001-07-19 15:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-19 1:52 Felix Rosencrantz
2001-07-19 8:56 ` Sven Wischnowsky
2001-07-19 15:48 ` Bart Schaefer [this message]
2001-07-19 18:42 ` Adam Spiers
2001-07-21 1:16 Felix Rosencrantz
2001-07-21 13:54 ` Oliver Kiddle
2001-07-22 20:34 ` Felix Rosencrantz
2001-07-23 4:25 ` Andrej Borsenkow
2001-07-23 10:56 ` 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=1010719154854.ZM4013@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--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).