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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21979 invoked from network); 20 Sep 2023 17:20:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2023 17:20:20 -0000 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:Date:Content-ID: Content-Type:MIME-Version:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=UNrG7jxr8lPOFoNXsiOzIyc29NL3mLr0cqWwVqmJoKM=; b=hZpGaGpJzqqp5zC4oea7FSAYPV 1+YzDq3UmSvqUsJEUmIPkDQWDyfht04nkbPTX9L15uurJf31AmhOQIMT2G1E68Q6FPdFwJpEqjzCR ypThx6PEdKeYaB6Xvue/UT9R4KF3KdVOWedh/oWIggKIDdRQfnOdmI7W6Y0J65Xhp6cFM2YisvRqD nkBSl34vgL72AwnT9ahtUpg2AJ347hO7K5yToGGV/XHgWw0vWMWUe4AmWMWakGURIoMkaqi6ejSkr SfDJoUs2jRDfGnnGaQllRdA4fbi8GOZokV2lZ39ElW2iKhH7d3CrhKSmGG3p6tgj/dEHqTL2QaWhH FZUL6BDg==; Received: by zero.zsh.org with local id 1qj0s7-000FxT-Q3; Wed, 20 Sep 2023 17:20:19 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qj0rr-000FdX-Un; Wed, 20 Sep 2023 17:20:04 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1qj0rr-0002bC-Fa for zsh-workers@zsh.org; Wed, 20 Sep 2023 19:20:03 +0200 From: Oliver Kiddle To: Zsh workers Subject: github PR to "Add command to improve robustness" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9992.1695230403.1@hydra> Date: Wed, 20 Sep 2023 19:20:03 +0200 Message-ID: <9993-1695230403.478634@56vb.M_iZ.HRRz> X-Seq: 52164 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: PR #101 adds "command" in several command substitutions in _find_net_interfaces: https://github.com/zsh-users/zsh/pull/101/files I would guess that the cause of the "bug" is function wrappers being defined which wrap ifconfig and ip to apply colouring to their output. There are a few random other cases where command is used as a pre-command modifier in the completions like this. I'm not keen on applying this selectively in one or two instances. And even less keen on adding it everywhere. Shouldn't it be _call_program's job to apply this? Though I've no idea how that can cope with pipelines. Or with the few cases where we use it to run builtins. I've never been keen on _call_program's use of eval - if the command comes from a style then fair enough but for the predefined one it mostly isn't helping anything. Any ideas? Or should we just tell them to test something like [[ -t 1 ]] if they insist on writing wrappers for system utilities that add colour. Oliver