From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19950 invoked by alias); 22 Apr 2016 22:44:11 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21480 Received: (qmail 25921 invoked from network); 22 Apr 2016 22:44:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=J2L4KiYHPamRK/Xrwz0wafgqrsDM2MkhB2xjTwznkuM=; b=E6pKa9b0Re/Sxs5xes9FERqKxQQS1b5LkSdHGccGxHEe7vFY8vop2Duqpd9o3/XiDx 2ioC5cYfdmyfZIWhMqhLBKq8PZ5KnRc7h2y9rfCqc9M8kGm9PDWxaf9T/XE3k+/UrwAE +nTSMgV2qjXdC0nHwUF1KKMCQrlidY83mrcVAqKkvoUyD5Ue4QJyFi99Ujokp8DxGllt rAlDtTFzc9DTqyeQe337i01mZg/ejVkkEtdgOeB81CDWtLB05T3GTPn0GChCq5IpVA16 CGDK9SXiwmqZtdqIf38Nryc3QklRgf2jBeNZQ7/G6oxLCB8DpNUzS76faQyKlBNiQbK6 Ks+g== X-Gm-Message-State: AOPr4FVjUPMXO82AJo6AFIva5RMh7uk43x772rYITbNpVVbjPawnsQE+c+6pSH8WUvVt0g== X-Received: by 10.98.64.79 with SMTP id n76mr31897828pfa.149.1461365045283; Fri, 22 Apr 2016 15:44:05 -0700 (PDT) From: Bart Schaefer Message-Id: <160422154422.ZM2884@torch.brasslantern.com> Date: Fri, 22 Apr 2016 15:44:22 -0700 In-Reply-To: Comments: In reply to zzapper "Re: adding configtest to service httpd options" (Apr 22, 8:49pm) References: <160421180453.ZM18158@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: adding configtest to service httpd options MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 22, 8:49pm, zzapper wrote: } Subject: Re: adding configtest to service httpd options } } Bart Schaefer wrote in } news:160421180453.ZM18158@torch.brasslantern.com: } } > 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.