From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10972 invoked by alias); 7 Oct 2014 16:04:00 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33378 Received: (qmail 21148 invoked from network); 7 Oct 2014 16:03:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=AghBasqjozonB2u07b+ah5VtU/4zuJ3eYxUGGR5Bhj4=; b=tUhS8FgJ8WSWUIUN1k3Fyz7iLxaz6LB0IE1LkDBWgc6mKZ3jLAgECeIw9naT2D68hf BjWhwuUOmpXlFly/VtLDS/RJkS7XcJX35rHsD2rrvYYy3abpgBfQugrrw3M/hKsf0i1g W0Hnr571sVDRMrbBOnc4KHbI3AKj22rQtUAm/iDnL72Y+NZTK47cQ5nadWgNQ1Q6HBzB v+Y6OCYBuWEZxURh3Rhs6nnDqbqRa6W83rt2laSChP2H5w9BwDDX7wz1L8rNfBPrlRz5 auAKJ5+qVsUgK/Ta3x2q6VrcVXqdPw3KZBOxUqHyNjRTbKBaBk4wVImlcjt87Mz/Jbuz K88A== X-Received: by 10.182.38.138 with SMTP id g10mr5423525obk.21.1412697822940; Tue, 07 Oct 2014 09:03:42 -0700 (PDT) Date: Tue, 7 Oct 2014 11:03:51 -0500 From: fREW Schmidt To: Oliver Kiddle Cc: zsh-workers@zsh.org Subject: Re: [PATCH] new completion for "sv" Message-ID: <20141007160351.GI6252@gae-bulg.lan.mitsi.com> References: <20141005200135.GD58824@wanderlust.lan.mitsi.com> <5624.1412624240@quattro> <20141007132025.GA6252@gae-bulg.lan.mitsi.com> <26747.1412695732@thecus.kiddle.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oYAXToTM8kn9Ra/9" Content-Disposition: inline In-Reply-To: <26747.1412695732@thecus.kiddle.eu> User-Agent: Mutt/1.5.22.1 (2013-10-16) --oYAXToTM8kn9Ra/9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 07, 2014 at 05:28:52PM +0200, Oliver Kiddle wrote: [snip] >=20 > 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: >=20 > _alternative \ > 'additional-commands:additional command:((check\:check\ status\ of\ ser= vice))' \ > '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? >=20 > 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. >=20 I'll look into that. [snip] > > Completion/Unix/Command/_sv | 73 +++++++++++++++++++++++++++++++++++++= ++++++++ >=20 > 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. >=20 Done. --=20 fREW Schmidt https://blog.afoolishmanifesto.com --oYAXToTM8kn9Ra/9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJUNA7lAAoJEG6zMC9zenWC9goP/j6B4ULoSpYIehG+4RUt0CaH 1TFjq5K9f3KhReWolKvbDhFcEsS2hR6U/pBrraJPXHbqDn/5m7pY72TJDBgn0Yi0 9MkiiB4ngDasMXqV8gZ0sPbXl3DHHlwEHrWX5LZ0av6N3YXFwpdoVYxQjVw9Vn4z QHPtsMLqWCr5yWtAa5NEHHHh3pj6pL2FEPVapskvBty43fQK9IaHgj+y2RN03DWL AKww6T4tLTcssd3deZ8ACZYPxWqUg4YA+vF48nKV84BY3VLrww8s/s7TRfnuhOsF DG7r6O7bL79d7+ziUQmVgasTTs7b4S5dg7pUUgGQlKGZ0rREF62IoVz32naRiS0w ojdWCqJyzHUXbrt87hPrfzGSgyj0sgNzp94BXKNsN2P+qibdmfFtZWUVKddWkQPJ dhR6hcZXK5AiRLkXiAh8Au/gXW8KMKAGaSPzPXLzsz8TgpeXVdqVyj5Z43foUTq8 pJJ8cqqaLu3wgaoPVxgIe1vP2kFnsf1b40d6gmURWl87LVOh6zBYHtsuCj4RZrlW Up7DtYO+3zxuH+ZfqHruwnxlRPbUE3n2p9JHgtHlqJPDfXTMP3bWD0R2Kbp2Xae7 ORQ/i+U8rXUG/DzjrkgobH9u3597jCgJ5AJf72Fu+FbxXIrPOhLvUyNKvgvxjTf4 WrBPWjjWQ9FSl74r10Zj =1deg -----END PGP SIGNATURE----- --oYAXToTM8kn9Ra/9--