From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10402 invoked by alias); 5 Oct 2014 20:01:45 -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: 33359 Received: (qmail 1040 invoked from network); 5 Oct 2014 20:01:43 -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:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=UI/SeuoqwTnMxTsbqxwnMzObkTlgzsc2i1yMWnttaN8=; b=ak/LmiDMmTfW7W+CLjyFjfsJ53SRa0gJELuKN6j3gbL7S84OCLfiZ+CAVdg1MkJKAb fdMRueMdwkIHCjd54CAEZivdS2uTfiSVpsnnV3fGx4+Vy/8gZ64H7RLIpMIce9MrgYpp J+n28QUIx6lP3Y1eob2M883/mOnzwk29CoTV9SwDnsgHJRss4ZRye7J5eMgvweWAwpbw lT1bp4quEdoMOt31Ee2GvX26LwrJ6htI2ybcSCSyMh/Ylj5MWx9AQDoKP9jpPdD5v8ed JC/bPMxhEgXtbqp8pIKoaojs+rQoDJz3RXZRFz/w8uth1/vkXe9DdYSIRWK//pnsqK5E av8w== X-Received: by 10.182.79.37 with SMTP id g5mr22560869obx.41.1412539297686; Sun, 05 Oct 2014 13:01:37 -0700 (PDT) Date: Sun, 5 Oct 2014 15:01:35 -0500 From: fREW Schmidt To: zsh-workers@zsh.org Subject: [PATCH] new completion for "sv" Message-ID: <20141005200135.GD58824@wanderlust.lan.mitsi.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TD8GDToEDw0WLGOL" Content-Disposition: inline User-Agent: Mutt/1.5.22.1 (2013-10-16) --TD8GDToEDw0WLGOL Content-Type: multipart/mixed; boundary="k4f25fnPtRuIRUb3" Content-Disposition: inline --k4f25fnPtRuIRUb3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable See attached a patch to add completion for sv (http://smarden.org/runit/sv.8.html) If anything is wrong just let me know, this would be my first contribution to zsh so mistakes wouldn't surprise me. --=20 fREW Schmidt https://blog.afoolishmanifesto.com --k4f25fnPtRuIRUb3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-new-completion-for-sv.patch" Content-Transfer-Encoding: quoted-printable =46rom a9b5d69371034e276548a8044c7dc8a021180ffb Mon Sep 17 00:00:00 2001 =46rom: Arthur Axel 'fREW' Schmidt Date: Sun, 5 Oct 2014 14:52:42 -0500 Subject: [PATCH] new completion for "sv" See http://smarden.org/runit/sv.8.html --- Completion/Unix/Command/_sv | 60 +++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 60 insertions(+) create mode 100644 Completion/Unix/Command/_sv diff --git a/Completion/Unix/Command/_sv b/Completion/Unix/Command/_sv new file mode 100644 index 0000000..9a55be1 --- /dev/null +++ b/Completion/Unix/Command/_sv @@ -0,0 +1,60 @@ +#compdef sv + +_arguments \ + '-v[verbose]' \ + '-w:wait time' \ + ':command:->command' \ + '*::options:->options' + +case $state in + (command) + local -a sv_ary + sv_ary=3D( + 'status':'Get status of service (and log service if available)' + 'up':'start if service is running. If service stops, restar= t' + 'down':'send SIGTERM and SIGCONT if service is running. After= it stops, do not restart' + 'once':'start if service is not running. Do not restart if it= stops' + 'pause':'send SIGSTOP if service is running' + 'cont':'send SIGCONT if service is running' + 'hup':'send SIGHUP if service is running' + 'alarm':'send SIGALRM if service is running' + 'interrupt':'send SIGINT if service is running' + 'quit':'send SIGQUIT if service is running' + '1':'send SIGUSR1 if service is running' + '2':'send SIGUSR2 if service is running' + 'term':'send SIGTERM if service is running' + 'kill':'send SIGKILL if service is running' + 'exit':'send SIGTERM and SIGCONT if service is running. Do no= t restart service.' + ) + + local -a sv_lsb_ary + sv_lsb_ary=3D( + 'start':'up with check/timeout' + 'stop':'down with check/timeout' + 'reload':'hup with check' + 'restart':'down and up with check' + 'shutdown':'exit with check/timeout' + 'force-stop':'stop with kill on timeout' + 'force-reload':'reload with kill on timeout' + 'force-restart':'restart with kill on timeout' + 'force-shutdown':'shutdown with kill on timeout' + 'try-restart':'restart if service is already running' + ) + + _describe -t commands "sv commands" sv_ary -V sv_commands + _describe -t commands "sv LSM init compat" sv_lsb_ary -V sv_init_com= pat + _describe -t commands "sv additional commands" '("check:check status= of service")' -V sv_addl_comm + return + ;; + + (options) + local -a sv_services + sv_services=3D( + $SVDIR/*(N) + $SVDIR/*/log(N) + ) + + sv_services=3D( ${sv_services#$SVDIR/} ) + _describe -t services "sv services" sv_services + ;; +esac --=20 1.9.3+fc2~572~g5a814b4 --k4f25fnPtRuIRUb3-- --TD8GDToEDw0WLGOL Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJUMaOcAAoJEG6zMC9zenWC3zAP/jko/ZJLldInnhQQHQ7xRsjN c9mOgGSPEn/LHzVB5M7XN55mvpac9vlY9YSMxeXnieI7WDM8UqrelYpBYitrU22K Y8bdjx0+1TL1Se+PWVg664ryPT1QVGFkE/h5UzA3Q4e3QsNAVpSyL+pkm3ETkS9m aHCB3VudnRRww5cdz0R+M1vXXYWsDUC5v58pdKgc3epfEvkEjo7uTbByteHygJHr 5lJgNqaEJsJPz2r+YFFsfarjS/WngMAr/uWNe9lQf8eQs64vSxOF+VRvdDr4Jl7T 6ygXXGbMOdET6S/TE3UcBwfhQcrTjrkWAnvHb06S0DAsjDfLKCH2ArEWKqIyHCby jOqMX2fc7dgZwyC6aWzB5mhwQxvOKLGKcQxIcFUbA0ynVNrYcXG8jyu8FlKf5odg EWppPLcq6XP26IwWnNPv0l6nZ91/CE2DTEz9q+eAmPjwNsrkgynVQGuMMeJ3uaMM 3li9XnLjNCnHeupGz/uL9YLo9U1tnvabLntIw0pMC9i9CqJ1HX+N4ZinQOj4YYcc 5AqQq5XrYvk64UuccZ1hBD0XhZIm4VKL0UyD1Uce7aUmSM+zBO2GWHgKJTEYTCUz ICVxpwv0X21B78j3W4ZycZ18E8yJIo9EV6YP/0ZWk0CS8fomL2GxZKl2drZmAEEO yK5i/lVGc9cFiVYzuKRt =xMao -----END PGP SIGNATURE----- --TD8GDToEDw0WLGOL--