From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43541-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 26cb2436 for ; Tue, 25 Sep 2018 07:56:51 +0000 (UTC) Received: (qmail 11543 invoked by alias); 25 Sep 2018 07:56:35 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43541 Received: (qmail 2803 invoked by uid 1010); 25 Sep 2018 07:56:35 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm1-f53.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.128.53):SA:0(-1.9/5.0):. Processed in 3.413331 secs); 25 Sep 2018 07:56:35 -0000 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=d5k6ps+sKKsIOm8xgpv21D8E4rU408jyUCneTVWokwQ=; b=aKwJoOv3AR144Q7gVuel7spwJPuHqwqdaJVRm5J8Mlqbo83l7Mt2L3+AfU64FatV2a knxtjbdflW0rF5Y3CFvlFqkNeATNZQe3gBCSmeIma5qpj11rH7bM3el7V8SDHc7Wq5Sx 6o0IdgB/0JCHgIDD6yiSCO9EQyWomoKaBfQfKfEpn0p/6c7MdlB6D6H9ZXCvkcbIxfi6 Li5b+CFnLSOlVLJvUqtk7aYC28ghR02QypvvVrFdD/uRzgO36KF2+7r3wia+1hT67y7i j23Q4ihM5Rn/6Jl02QDp3lyDGzrgw5N5GjjPFQS7FQXKegTW/05h0AIuCjcNN2swzQSH rvEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=d5k6ps+sKKsIOm8xgpv21D8E4rU408jyUCneTVWokwQ=; b=BBYY4ai8NMJyUQCV1NTPex1KIPvZMWL9zGgJcxFlm6UuSMhEWJz8mOvclIrcoJOF79 v8P1IilDxTMQ+mwvoNnql7qG/ZuoS+ItPd4xYPY0FdUJwjNpYGWmU9U5wwjwDwX1KUnf 7wcC0YBqq7dNAc+xUdiX8QTQ/mJ+jzFw2NBNugEqtWxOC95OyVCcixHXe2575gysZpqR l7iT/b0js3HhsBW9CrDYy4BCiFJ/rhT6BEyS4U/qe35FxTAcRsPub6AAMTuBQ+TaCwCF ZevmZfGDKivEU78dZG95tmuJOrFevbUn9IgOhXfBcC6ga93we7XcQdPZ71HzvRdxljLb GUCg== X-Gm-Message-State: ABuFfojiEnLoUL4SL9WF5GBInkRmwgx82yrWDv+5JlDx7/PiwiSd2WiF PET6Cx1kd298VlqUMvHRRAs= X-Google-Smtp-Source: ACcGV6309Buorn8QAK5WeQJE5eru9HjjG4jlkFO97OtmEG8YfmP/V5PBS/1CprGqfhqmTyJxsRn1Rw== X-Received: by 2002:a1c:2ed4:: with SMTP id u203-v6mr1314218wmu.19.1537862187597; Tue, 25 Sep 2018 00:56:27 -0700 (PDT) Date: Tue, 25 Sep 2018 08:56:25 +0100 From: Stephane Chazelas To: Peter Stephenson , Zsh Workers Subject: Re: BUG: Shell builtin `which` prints non-existent commands to stdout Message-ID: <20180925075625.lxvmf5s3ldiduldo@chaz.gmail.com> Mail-Followup-To: Peter Stephenson , Zsh Workers References: <20180924080031.ee7lqmthxpmvqaal@klaus.seistrup.dk> <20180924102219eucas1p2469f827265423a2f3b5e7d98fc08412e~XTuQ1aIyy2293622936eucas1p2L@eucas1p2.samsung.com> <20180924122933.gpzp4vfix6zl66nw@klaus.seistrup.dk> <20180924125126eucas1p2e4ae5b63ce6320957ee99737f93181ae~XVwcoX7b91518615186eucas1p2T@eucas1p2.samsung.com> <20180924221820.opyz3vnlo4wquy35@chaz.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180924221820.opyz3vnlo4wquy35@chaz.gmail.com> User-Agent: NeoMutt/20171215 2018-09-24 23:18:20 +0100, Stephane Chazelas: > 2018-09-24 13:51:24 +0100, Peter Stephenson: > > On Mon, 24 Sep 2018 14:29:33 +0200 > [...] > > + The original reason for this is that this behaviour is inherited > > + from the C shell (csh), where `tt(which)' itself orignated. So > > + it has been in zsh a very long time, and it is now a feature. > > + (It would be possible to change this in emulation modes; however. > > + so far this possibility has been seen has more of an additional > > + confusion than a help.) > [...] > > csh had no "which" (tcsh has a which builtin), but there was a > "which" csh script added to 3BSD 1980 that was looking up > commands in $PATH and in the aliases defined through ~/.cshrc. > https://github.com/dspinellis/unix-history-repo/blob/BSD-3/usr/ucb/which [...] Sorry, correction: "which" was added to csh in 4.4BSD (1991) and various other BSDs that had already forked by then later (NetBSD in 1994 for instance, and FreeBSD has switched to tcsh IIRC), though csh on some systems like Solaris are based on older versions and still don't have "which" builtin. -- Stephane