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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27261 invoked from network); 22 Jul 2022 09:22:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Jul 2022 09:22:10 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1658481730; b=eLMCapzpRT/s1G+kZRdLRGXlGaDzgkMXqT4N1XiP9BUyhutxAGoB2Rn8rXoggF2DEJh+uWNjDs 43fPcI4Aje8YX2YSE2c+1ZbbruLGXMNjEBjP8BBlgSnJW/dGzdfAvEoyWUTJSkPDiOUE/ASPnn +Q0mWDBx5CEFLFJDFjqavF/8oItMkQCv+of8+n5AGpvv5l3VhIsZdSblpBUXHvbIphd3h7/6iW LLRHSNOwj5NeIjcfekqkTuu6CeUNIDOU0Rz89dORxpFkylYeBDJTsUEtZQgg2ybzoBYgu2lms3 FmPjTvMtsh9NtLk29k2DFdcKuu7LQMvHdj6ZK0e/b7hk+w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd01001-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.17; 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=1658481730; bh=Cdfb9VqL0cLEpQXZ3+FQPrQOCIw26BlQ0uTxq1FawS0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:Date:Message-ID:Subject:MIME-Version: Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=JGibcTvpJ/O2fRxT//MlVMVSr5NAht+upeR38xbKoYOxog9jMWp7eWuC5ZAXVcTvxe9VXddb2u wpXiYTfRu7Oqi6I76nOzaNSS5utqANsxSh9FZJLNXY/34xfN7SgadM5Jaw2SY3IBnD6stDv7aE iEhQWa4srk27EFPlHidui4Mu3OXePGqWktloViYuvO6ehtfC+qSSkJjdGBvQ/ytnnqrr4lkPgT cEO0cy/LFYU4Z1LslFWnUE+XulyAjaiEwGu0ejfSVDX52nDdYYUFEB4oxAhEW5n/sDed7JAUX+ IkXGi/ZLBK2xDc2L1zlPGp6WShtEN5m2xAmyy3yI2aqa+Q==; 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:To:Date:Message-Id: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:In-Reply-To:References; bh=Kn2jGyFuengkbPrOzk59nRu668g1jChh+LDjSk73WHU=; b=eeDdno1YAsabbJePMxw6AMmnWV DV+S/6Hh1zFMT3+gugAhq8l9RR7JUuSuHSx23ORO9+19gxZBUAalk4OpCI5rVbmFK9tMynEB7FY4Z 15GLbb3nNgo3RE/NUkWFx4XW+SUek3RUd5Pn/bFsQB/07/U1aHpJaxf23jtYJx552A3gnmaIw1dlz VOLSAmNxgYO9i4i3bKPMXdyEBmA7vvv6RU1jPSGkjDvHZTIqrgYTCcK9IZOU/5aVUJoY8DvUSCHfi Es+0VTRLwG7uJ2isYluqlMccqFsKuG6MZ8mpLir6TV9KOUoeDS+d6ejLZmns0kQSF84uBr2jaIxIW WMu5NeVw==; Received: from authenticated user by zero.zsh.org with local id 1oEorJ-000C92-Ag; Fri, 22 Jul 2022 09:22:09 +0000 Authentication-Results: zsh.org; iprev=pass (snd01001-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.17; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd01001-bg.im.kddi.ne.jp ([27.86.113.17]:45601 helo=dfmta1005.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oEom8-000BiA-Ck; Fri, 22 Jul 2022 09:16:50 +0000 Received: from mail.biglobe.ne.jp by omta1005.biglobe.ne.jp with ESMTP id <20220722091641846.PQVC.30085.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Fri, 22 Jul 2022 18:16:41 +0900 From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: [PATCH] _redirect: add missing 'context' arg to _dispatch Message-Id: Date: Fri, 22 Jul 2022 18:16:41 +0900 To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 50421 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: In zshcompsys(1), in the description of the special context -redirect-, zstyle ':completion:*:*:-redirect-,2>,*:*' file-patterns '*.log' is another way to make completion after `2> ' complete files matching `*.log'. This works fine. But if I try the following to restrict this to a specific command, say make, zstyle ':completion:*:*:-redirect-,2>,make:*' file-patterns '*.log' it does not work; 'make 2> ' offers all the files. 'make 2> ^Xh' shows: tags in context :completion::complete:-redirect-,2>,/usr/bin/make:: globbed-files (_files _redirect) so the context includes not 'make' but '/usr/bin/make'. I think the problem is in the last line of _redirect: _dispatch -redirect-,{${compstate[redirect]},-default-},${^strs} The 'context' argument to _dispatch is missing, so the 1st word of the results of the brace expansion (with RC_EXPAND_PARAM) is used as the 'context'. _value has a similar use of _dispatch with explicit 'context' arg. diff --git a/Completion/Zsh/Context/_redirect = b/Completion/Zsh/Context/_redirect index e6da5d115..520a7666e 100644 --- a/Completion/Zsh/Context/_redirect +++ b/Completion/Zsh/Context/_redirect @@ -15,4 +15,5 @@ if [[ "$CURRENT" !=3D "1" ]]; then fi fi =20 -_dispatch -redirect-,{${compstate[redirect]},-default-},${^strs} +_dispatch -redirect-,${compstate[redirect]},$_comp_command \ + -redirect-,{${compstate[redirect]},-default-},${^strs}