From: fREW Schmidt <frioux@gmail.com>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] new completion for "sv"
Date: Tue, 7 Oct 2014 11:03:51 -0500 [thread overview]
Message-ID: <20141007160351.GI6252@gae-bulg.lan.mitsi.com> (raw)
In-Reply-To: <26747.1412695732@thecus.kiddle.eu>
[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]
On Tue, Oct 07, 2014 at 05:28:52PM +0200, Oliver Kiddle wrote:
[snip]
>
> At least based on the documentation, _alternative is supposed to take
> _arguments like specifications. Apparently it works with a list of
> functions as you have done. An example would be:
>
> _alternative \
> 'additional-commands:additional command:((check\:check\ status\ of\ service))' \
> 'lsb-commands: : _describe -t lsb-commands "LSB command" sv_lsb_ary' \
> 'sv-commands:sv command:_sv_commands'
So when I tested this it made me realize something. The way I had it
initially was so that the commands would come first, and then the lsb
commands would be listed, and then finally the additional command. I
tried passing _alternative -V foo like you can with _describe to
preserve order byt I couldn't get that to work. Any ideas?
> > This raises an interesting question. I did what you said, but as
> > Christian Neukirchen pointed out, on his system the default SVDIR is
> > /var/service, and on ubuntu the default is /etc/service. I guess it's
> > up to the packager to tweak the script or something?
>
> I guess it could try to find out what distribution you have by checking
> for release files in /etc and choosing a suitable default accordingly.
>
I'll look into that.
[snip]
> > Completion/Unix/Command/_sv | 73 +++++++++++++++++++++++++++++++++++++++++++++
>
> One thing I forgot to mention is that it should be named _runit:
> functions are normally named after the software rather than the command,
> e.g. _subversion for svn.
>
Done.
--
fREW Schmidt
https://blog.afoolishmanifesto.com
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-10-07 16:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-05 20:01 fREW Schmidt
2014-10-05 20:04 ` fREW Schmidt
2014-10-06 9:54 ` Christian Neukirchen
2014-10-06 19:37 ` Oliver Kiddle
2014-10-07 13:20 ` fREW Schmidt
2014-10-07 15:28 ` Oliver Kiddle
2014-10-07 16:03 ` fREW Schmidt [this message]
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=20141007160351.GI6252@gae-bulg.lan.mitsi.com \
--to=frioux@gmail.com \
--cc=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/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).