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, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16874 invoked from network); 31 Oct 2022 13:31:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Oct 2022 13:31:20 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1667223080; b=NZs0pTBEjRuBFdVdrCxBu+844fV7iU+23MDes8Lni0oivocu+fxcjveTAXNso3ZrN2A2znn76/ gtsOATmmwmB8MfMS50hUImOZuY6YblGGQelnxBu4Vc2kmcJFxrhNxzx5NLKNP6QH8Pn+dn3Tw/ 9dEbEEvAgu6VNEnW1AIsviru8WUYbr2dKTblYLQkyQFRk0T6/ymWYN3UA7ImTGvUzbdVu7PVH+ 3IvXLwZrWB1DUbEETZJL93PSbGZ0OSbBL3b3m4J7em3Xw5Kkz5TzrTPADd04lYXEhlyxfY69I6 52+Fcji9R8uEEXRPgQSDrnybSJZrePCX2m+nF2krz4I/hQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1667223080; bh=/2wdWl/ZB1r/WEVy4mc6Qd7GSd1DrRK4hCKVOVUIoew=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Subject:From:To:MIME-Version:Date:Message-ID:Content-Type: DKIM-Signature; b=VWlyd2Kpu/BO1fIYMM92TwbP6gdseTxc95lKieLpwdOKGtuqEwTHTwRG4Km3aHxX5bR4q9i34G kCSPT754RYsqLGK0Ep7i0mkWBAokugSjZ00wcKEV6u5ppNt9qFvxXTDLYVoAjTeI4qPLQ0E+Nb oOrLN1OcIZDcDpyWs5q20rIM4SUYxvC7sl6DvfExgKfO7t3oLyGz6xRF/r9UD5KATEuaAznLi5 q2L98sOVAEkVL30yOU5u7oFOf5Ij0O5T8JWfu/VKP2bm49QFez/a6UTYV5O+ecG4KKezF5VBS9 9bg1uWmp5WQnMw7QKDAGTuQwBt0DCvMozMFTid55XIWzGw==; 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:Subject:From:To:MIME-version:Date: Message-id:Content-type:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=I2WjW1V7wGhuXYHIIkepAr/pipDjLRN6Wzy7LHYdrJo=; b=WxqWhqrnhACWFLB5MaVM+uX+fG RonsJkquHXpJ9lHExBCqgQGQyWzuEYU/CmZRTKqMUVaqtHNJepZhsG6jQW1B/5g/ZVSr/qWVsRt3n aICCN5AQPfpfxhafVTmEoHkbet6+wwMIa0GoAp5T41aHbXfYqhOqFHYJDlkPvmH4UFDRUmrX2twwW KQqQ/EcbwG5dPoBXOflxMSf75wGrgcrkzHogRZgGG17loiZ4xqJpSp+Txl9AVlhOA5h0W1XwF2C6X HOuELAQyuQvzslIyWNo/Gbrj+seDfOCvqrN85zHOuFcFBV6lNHW21sbeUCWVBXy6xiTGfAn3q/9vT SAN3SGaQ==; Received: by zero.zsh.org with local id 1opUso-000Jua-23; Mon, 31 Oct 2022 13:31:18 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:46317) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1opUs2-000JCf-D1; Mon, 31 Oct 2022 13:30:31 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta02.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RKM00G89A59XX80@mta02.eastlink.ca> for zsh-users@zsh.org; Mon, 31 Oct 2022 10:30:28 -0300 (ADT) Received: from [192.168.0.2] ([24.207.18.108]) by Eastlink with ESMTPSA id pUs0oYgwuXZnZpUs0oICRI; Mon, 31 Oct 2022 10:30:28 -0300 X-Authority-Analysis: v=2.4 cv=I9+jBvsg c=1 sm=1 tr=0 ts=635fcdf4 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=kyyJmd9755so1i9BbYAA:9 a=QEXdDO2ut3YA:10 a=LhG6nNZDXOh6kyQunFQA:9 a=lvz9oIvrx_KYprNA:21 a=_W_S_7VecoQA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrudefgdehvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptgfkffggfgfvhffusegrtderredtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeejjeffgeelkeekheeljedvkeevhfdtieevudeiudevkeevvefhkedvheegueelkeenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrddvngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: -100 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------zkdiUXrP0PsKtPeJoFnTv0OE" Message-id: <8cfe03ee-cddc-f70b-0c62-b506e49dfe58@eastlink.ca> Date: Mon, 31 Oct 2022 06:30:27 -0700 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Content-language: en-US To: Zsh Users From: Ray Andrews Subject: whence output varies with dot vs. realpath in $PATH X-Seq: 28288 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: This is a multi-part message in MIME format. --------------zkdiUXrP0PsKtPeJoFnTv0OE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Trying to get whence to be both case insensitive and accepting of patterns I noticed something interesting.  The first item in my $PATH is the dot, I take this as not unusual because one might want to execute some command found in the current directory. Anyway: 0 /aWorking/Zsh/Source/Wk 1 $ whence -mavS "(#i)*rap" RAP is an alias for echo howdy _trap is an autoload shell function rap is a shell function from rap trap is a shell builtin bwrap is /usr/bin/bwrap select-default-iwrap is /usr/bin/select-default-iwrap ... I have a whole load of various absurdly named test files in the current directory but whence doesn't find them.  However if I modify my PATH to make the dot expand to the ( do we say 'canonical' ? ) ... the actual name of the current directory: 0 /aWorking/Zsh/Source/Wk 1 $ vared PATH /aWorking/Zsh/Source/Wk:/aWorking/Zsh/System:/aWorking/Bin:/usr/local/bin:/usr/sbin:/usr/bin: ... everything is found: 0 /aWorking/Zsh/Source/Wk 1 $ whence -mavS "(#i)*rap" RAP is an alias for echo howdy _trap is an autoload shell function rap is a shell function from rap trap is a shell builtin RAP is /aWorking/Zsh/Source/Wk/RAP RAP is RAP RAp is /aWorking/Zsh/Source/Wk/RAp RAp is RAp RaP is /aWorking/Zsh/Source/Wk/RaP -> /aWorking/Zsh/Source/Wk/RAP RaP is RaP bwrap is /usr/bin/bwrap rAp is /aWorking/Zsh/Source/Wk/rAp rAp is rAp select-default-iwrap is /usr/bin/select-default-iwrap ... all my silly files show up, infact they show up twice.  The eg: "RAP is RAP" doesn't seem to say very much when we already have: "RAP is /aWorking/Zsh/Source/Wk/RAP" We can even get three restatements:     2 /aWorking/Zsh/Source/Wk 0 $ /bin     2 /bin 0 $ whence -mavS "zsh"     zsh is ./zsh     zsh is /usr/bin/zsh     zsh is zsh ... again the last line doesn't seem very useful.  The first is of course true and the second line seems to highlight the fact that in Debian '/bin' is a link to '/usr/bin'. Thoughts? Can I have the full output while leaving the dot in my path? --------------zkdiUXrP0PsKtPeJoFnTv0OE Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Trying to get whence to be both case insensitive and accepting of patterns I noticed something interesting.  The first item in my $PATH is the dot, I take this as not unusual because one might want to execute some command found in the current directory.  Anyway:

0 /aWorking/Zsh/Source/Wk 1 $ whence -mavS "(#i)*rap"

RAP is an alias for echo howdy
_trap is an autoload shell function
rap is a shell function from rap
trap is a shell builtin
bwrap is /usr/bin/bwrap
select-default-iwrap is /usr/bin/select-default-iwrap

... I have a whole load of various absurdly named test files in the current directory but whence doesn't find them.  However if I modify my PATH to make the dot expand to the ( do we say 'canonical' ? ) ... the actual name of the current directory:

0 /aWorking/Zsh/Source/Wk 1 $ vared PATH
/aWorking/Zsh/Source/Wk:/aWorking/Zsh/System:/aWorking/Bin:/usr/local/bin:/usr/sbin:/usr/bin:

... everything is found:

0 /aWorking/Zsh/Source/Wk 1 $ whence -mavS "(#i)*rap"

RAP is an alias for echo howdy
_trap is an autoload shell function
rap is a shell function from rap
trap is a shell builtin
RAP is /aWorking/Zsh/Source/Wk/RAP
RAP is RAP
RAp is /aWorking/Zsh/Source/Wk/RAp
RAp is RAp
RaP is /aWorking/Zsh/Source/Wk/RaP -> /aWorking/Zsh/Source/Wk/RAP
RaP is RaP
bwrap is /usr/bin/bwrap
rAp is /aWorking/Zsh/Source/Wk/rAp
rAp is rAp
select-default-iwrap is /usr/bin/select-default-iwrap

... all my silly files show up, infact they show up twice.  The eg: "RAP is RAP" doesn't seem to say very much when we already have: "RAP is /aWorking/Zsh/Source/Wk/RAP"

We can even get three restatements:


    2 /aWorking/Zsh/Source/Wk 0 $ /bin

    2 /bin 0 $ whence -mavS "zsh"

    zsh is ./zsh
    zsh is /usr/bin/zsh
    zsh is zsh

... again the last line doesn't seem very useful.  The first is of course true and the second line seems to highlight the fact that in Debian '/bin' is a link to '/usr/bin'.

Thoughts? Can I have the full output while leaving the dot in my path?

--------------zkdiUXrP0PsKtPeJoFnTv0OE--