Zsh Mailing List Archive
Messages sorted by:
Re: adding configtest to service httpd options
- X-seq: zsh-users 21480
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: adding configtest to service httpd options
- Date: Fri, 22 Apr 2016 15:44:22 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=J2L4KiYHPamRK/Xrwz0wafgqrsDM2MkhB2xjTwznkuM=; b=c3tBLFadyzbVe/ACFtbB5wxp3bm2IC8tlNTNhg82ivVD/so7ggwJJ0/aPZBi/ak7RV 6nCAVz6CU30oOR6JcMSi+Ehu2Xk+c287K8vWe91YwduYPchX940MKw48mNdzjV31w+JW d5tlEjgj3U9KpucmS0kSRUSc+pTqPdlnv+tQoPDL69+3J77Yb7IvQ42cM8IY21nEA0T/ l4TYPvMX9tZGQr0mLGVO/3N+MeljB7DnQmO9bClPxlBGSiYmCT84B+mn992Hpyg3CM3O GJO4zTZh1y3ArcHBlAasO/Ep9FAq7p+4Xr0F9qHiSlE1zCnoKlH5/m0Z+z/FTnhAiBks B41g==
- In-reply-to: <XnsA5F2DE187A748davidrayninfocouk@22.214.171.124>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <XnsA5F1B69EA1363davidrayninfocouk@126.96.36.199> <160421180453.ZM18158@torch.brasslantern.com> <XnsA5F2DE187A748davidrayninfocouk@188.8.131.52>
On Apr 22, 8:49pm, zzapper wrote:
} Subject: Re: adding configtest to service httpd options
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote in
} > You need to change the assignment what='(...)' to add configtest to
} > the alternatives.
} Yep can't get this to work , but not a big priority .
Ah. Hadn't actually looked closely at /etc/init.d/httpd, there is a
bit more to the issue than I thought.
} Are you implying that the completions only allow for standard actions
} and not optionals like configtest which may not be used by all
} versions of httpd?
I'm implying that the completions only allow for the actions that are
supported generically by any/all [or at least most] scripts to be
found in /etc/init.d, and that /etc/init.d/httpd adds several that are
unique. If you attempt to complete after "service foo", then _init_d
looks for /etc/init.d/foo -- and if it finds it, it scans through that
file looking for "case" branches matching start, stop, status, etc.
It then offers whichever case-branches it finds as the completions.
/etc/init.d/httpd not only has case-branches that _init_d is not even
looking for, it also has case-branches that use syntax that the case-
branch search in _init_d won't match even if looking for the correct
words. _init_d wants every case to look like " start)" or " stop)"
etc., but http has " graceful|help|configtest|fullstatus)" all in
one combined branch [at least in my copy]. _init_d is unprepared to
deal with that.
This is a situation in which a "good enough" generic completion was
created and special cases are *way* outside of what it covers; there
is no simple correction.
Messages sorted by: