From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6551 invoked from network); 9 Aug 2023 14:10:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Aug 2023 14:10:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1691590219; b=CyR8hSTC6h+OmHAuiKfAfIuHs46a78CtXeyg6LsPHcJ/83QPS1ZF/HkeL87tmXW2bvCiLzj3gf YAAcAXytXfydJ1/mS8hovOZxZblTubRcyn7yJoHRHmoSO06LAW4ywBEpInGtRP5/hgvziMAMQ6 z3EV7uFrxGoG//NCWTUfA2KaFQbzEJOo4BPuM8AjynTW+OJXZXxMNSiCAmF/YZEqX6jBls/blt /1clRTSLc6SWQeXK3vUm4m+BKN1r+Sm6E4iDFEoEdYD32dtmNrQpxGmwEDk+Q9qE/TolzSO3gl nuBQgaevTsdwaq9xy3f7NUuLUlt7/7wPzM6rILgqa4XWgA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00012-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.12; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1691590219; bh=C+NQyuEapPW0FD/ZOianlcHhZNKsHt+swn79pnwGclQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=gT7XUSmHq9C5iqgRIlau+/YgbJ3brA2VlbVAc3HzpxSr/+e6BAs8DiaEbVIqKmTg97duiT9rXV 5NgHtHLBK2vCENEzRhDSlNlS/AgEa68GvZpsGdaVdlT9Qng9QodsCZZEs0BsZ9V/i/Yv19o57g q1ZW545Mi61SrXMxjXeiRZ+0haapEZnmp2GrIQ7KFt7Zj6+fDT/cEaGrog2ITSaOAGdgqXGWV9 Gn2rQftjBJLWEhUVcPV5GN0FIP3yfOZxzfswyyxnxTWmi8pEjoI2tE44YcsSeo270TvrkgkLwE OyVKAic6tZ+45Xu0Z6319l/FSdx5tKrbExNVnAnY13cfIg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-Id:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=vWeGa/O51uFYoTztHWYCBT9jLajSJeDKHDxKbXWEmuo=; b=kCl54XV3fdOvdn6YPakLk4W8ur wf9KmjroH8cKHTOmTYLU5r9H9E7ugYyEwPISW5GwiDQIQ4U/PKAmcBOXf64r47SMMWzLRW2/Vw7VP aCLuZhjLQ/qSdCEC4EhEDE+GqvNO/BpC9lvsiy9m1RimQhKMDZhzi+otOk7Byv84OwQZQINbdthsf AUY3kjZWZtECpoWxQd/v9QJRo3UFY5SvPnvRJ6ez8UFEx4P7PEdnRKC5R9cYbrFYNF/4r7iiFXkRo EDkg3933hz28XQPFv+/erzU7CkZUqWOw9Wfz5U78QL7cGLu5KKg3CAIZXGoV7manY1urICWXXbVMm sWoJy3rA==; Received: by zero.zsh.org with local id 1qTjtD-0000aW-2N; Wed, 09 Aug 2023 14:10:19 +0000 Authentication-Results: zsh.org; iprev=pass (snd00012-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.12; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00012-bg.im.kddi.ne.jp ([27.86.113.12]:57505 helo=dfmta0032.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qTjs4-0000Fo-Eb; Wed, 09 Aug 2023 14:09:14 +0000 Received: from mail.biglobe.ne.jp by omta0032.biglobe.ne.jp with ESMTP id <20230809140903063.QNUH.29129.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Wed, 9 Aug 2023 23:09:03 +0900 From: "Jun. T" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: [PATCH 0/6] Update coreutils command completions Date: Wed, 9 Aug 2023 23:09:02 +0900 References: <20230802062128.125238-1-syohex@gmail.com> To: zsh-workers@zsh.org In-Reply-To: Message-Id: <4917B5AE-3449-49BC-94D3-F20FFEB16D3F@kba.biglobe.ne.jp> X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 52037 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: > 2023/08/07 5:26=E3=80=81Bart Schaefer = =E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB: >=20 > if someone who is more familiar with the > implementations he's patching would like to step in, please do. The second hunks in the patches for _env and _watch below are (possible) fix for a problem that existed before his patch. _env and _watch call _normal to complete a command and args, but since they are passed to execve() or 'sh -c', it would make no sense to = complete zsh bultins or functions etc. I replaced _normal by _normal -p env/watch so that only external commands are offered. Is this a correct use of the option -p? Other hunks are just minor fixes. Completion/Unix/Command/_date | 2 +- Completion/Unix/Command/_env | 4 ++-- Completion/Unix/Command/_watch | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Completion/Unix/Command/_date = b/Completion/Unix/Command/_date index 6be34ffcd..9add1a9bc 100644 --- a/Completion/Unix/Command/_date +++ b/Completion/Unix/Command/_date @@ -19,7 +19,7 @@ if _pick_variant gnu=3D"Free Software Foundation" unix = --version; then $f{-R,--rfc-email}'[display in RFC5322 format]' $f'--rfc-3339=3D-[display in RFC 3339 format]:precision:(date = seconds ns)' '(-u --utc --universal)'{-u,--utc,--universal}'[display or set time = in UTC]' - '--resolution[output the available resolution of timestamps]' + $d'--resolution[output the available resolution of timestamps]' '(- :)--help[output help and exit]' '(- :)--version[output version info and exit]' ) diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env index f7283e132..bdab71bbe 100644 --- a/Completion/Unix/Command/_env +++ b/Completion/Unix/Command/_env @@ -9,7 +9,7 @@ case $variant in (( $#words > 2 )) && ign=3D'!' args=3D( '(-)'{-i,--ignore-environment}'[start with empty environment]' - '(-0 --null)'{-0,--null}'[end each output line with NUL, not = newline]' + '(* -0 --null)'{-0,--null}'[end each output line with NUL, not = newline]' '(--ignore-environment -i --help = --version)*'{-u+,--unset=3D}'[remove variable from the environment]:env = var to remove:_parameters -g "*export*"' '(-C --chdir)'{-C+,--chdir=3D}'[change working = directory]:directory:_directories' '(-S --split-string)'{-S+,--split-string=3D}'[perform word = splitting]:string to split' @@ -59,7 +59,7 @@ if [[ -n $state ]]; then shift words (( CURRENT-- )) done - _normal && ret=3D0 + _normal -p env && ret=3D0 ;; user-class) if compset -P 1 '*/'; then diff --git a/Completion/Unix/Command/_watch = b/Completion/Unix/Command/_watch index 91244abe7..e12add520 100644 --- a/Completion/Unix/Command/_watch +++ b/Completion/Unix/Command/_watch @@ -18,7 +18,7 @@ case $variant in '(-g --chgexit)'{-g,--chgexit}'[exit on command output change]' \ '(-n --interval)'{-n+,--interval=3D}'[specify update = interval]:update interval (seconds) [2]' \ '(-p --precise)'{-p,--precise}'[run command at precise = intervals]' \ - '(-q --equexit)'{-q,--equexit}'[exit when output of command does = not change for the given cycles]:cycles' \ + '(-q --equexit)'{-q+,--equexit=3D}'[exit when output of command = does not change for the given cycles]:cycles' \ '(-r --no-rerun)'{-r,--no-rerun}'[do not run the program on = terminal resize]' \ '(-t --no-title)'{-t,--no-title}'[disable header]' \ '(-w --no-wrap)'{-w,--no-wrap}'[disable line wrapping]' \ @@ -34,7 +34,7 @@ case $variant in then _cmdstring && ret=3D0 else - _normal && ret=3D0 + _normal -p watch && ret=3D0 fi ;; # watch(1) has completely different semantics on freebsd compared to = linux, hence: