zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: Bart Schaefer <schaefer@candle.brasslantern.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: PATCH: completion for SysV initscripts
Date: Sun, 18 Mar 2001 14:49:00 -0500	[thread overview]
Message-ID: <20010318144900.A22577@dman.com> (raw)
In-Reply-To: <1010318175713.ZM12585@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Sun, Mar 18, 2001 at 05:57:13PM +0000

> Isn't this going to conflict with Completion/User/_init_d ?  Does _init_d
> not work on Debian?

Ugh.  I appear to have completely missed that thread.  I'll
remove the new stuff.

This incorporates rcS.d, and force-re{load,start} possibilities.
Debian policy mandates `start', `stop', `restart', and `force-reload'.
`reload' is optional, and, of course, you'll find other arguments
in various scripts.

I guess the easiest thing would be to have a style setting for
when the file can't be parsed (defaulting to start,stop).

Index: Completion/User/_init_d
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_init_d,v
retrieving revision 1.2
diff -u -r1.2 _init_d
--- Completion/User/_init_d	2001/03/08 10:17:04	1.2
+++ Completion/User/_init_d	2001/03/18 19:37:40
@@ -1,4 +1,4 @@
-#compdef -P */(init|rc[0-9]#).d/*
+#compdef -P */(init|rc[0-9S]#).d/*
 
 local magic cmds what
 
@@ -7,7 +7,7 @@
 # If the file starts with `#!' we hope that this is a shell script
 # and get lines looking like <space>foo|bar) with the words in $what.
 
-what='(st(art|op|atus)|re(start|load)|debug_(up|down)|dump(|_stats)|add|delete|clean|list)'
+what='(st(art|op|atus)|(force-|)re(start|load)|debug_(up|down)|dump(|_stats)|add|delete|clean|list)'
 
 read -u0k 2 magic < $words[1] && [[ $magic = '#!' ]] &&
     cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $words[1])"}:#[[:blank:]]#(\'|)${~what}(|${~what})#(\'|)\)}}//[^a-z_]} )


      reply	other threads:[~2001-03-18 19:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-18 14:15 Clint Adams
2001-03-18 17:57 ` Bart Schaefer
2001-03-18 19:49   ` Clint Adams [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=20010318144900.A22577@dman.com \
    --to=schizo@debian.org \
    --cc=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).