Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: Shell builtin `which` prints non-existent commands to stdout
- X-seq: zsh-workers 43541
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>, Zsh Workers <zsh-workers@xxxxxxx>
- Subject: Re: BUG: Shell builtin `which` prints non-existent commands to stdout
- Date: Tue, 25 Sep 2018 08:56:25 +0100
- 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==
- In-reply-to: <20180924221820.opyz3vnlo4wquy35@chaz.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: Peter Stephenson <p.stephenson@xxxxxxxxxxx>, Zsh Workers <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20180924080113epcas4p4f8f89aa03a2cebc5030fd45dca0f6e84@epcas4p4.samsung.com> <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>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author