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,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28387 invoked from network); 31 Oct 2022 14:57:48 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Oct 2022 14:57:48 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1667228268; b=JiPEihBANKKeStPmcIUpLcG0fpRd1gJp08vn86QqL7gryyDYj26Yh1IQb+0MUMgbgAkhnhfU/W 6sJzHS2YZvBld0BqAQcu3lgfuEtim0+u42Ye2spqj+WGnqS8KaH5QJnibPAgaut4U59Irux0Td zZLplH+cq99iqXZS3C3b6TMdhPgulWofYl1XAO0+dgC0v1Q2xaPkhGDHygaz1OONNetacdYska 3rQwp6SjcVVCQb9gqISVg0iepcYTHYleoAjbwFx86IdU+FDEJbJR4b+yy4ijt/bhmUj7ylbw4I tUZ7ujvZdO/MAkkfEssN18TvTM4xzA8rBcvnxdSoW8Ihmg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; 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=1667228268; bh=3Nhd8KEtEHYL0e6CuNA53s+MYaXbxKkzN9BwHpbVloA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=AYzeA40pGMJxrvMNocy4sysWOdHC4pDA7PQeEm1b9T6GjV9m24L3sPzJiJaybVO+NtfjpLcUC7 zRiQA7ABPTzTObQwiv0Tkrg/No28vufryFXa+Z3tvSRLGA4DJlM0tZqpf70+3dBP5Y1UCW5QkM JN9Z50EsOfiVpmkvyYjHjbhaX443tEB/x3RCXr2wT+USIwhFqa0F7fQj38TbnQ/9MEzZCKJ/ae XNXdpf9s2C4PaiPEly91GY4Lb+F0B+zQaRgHV902so++igMhy3xGdZGznWWnVQ5P+MfZiQX4k6 Y7TUa7yZ9SLcEe18oCET06Zyr+YuR29sVfNYEOdY4LRzfA==; 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:Content-transfer-encoding: Content-type:In-reply-to:From:References:To:Subject:MIME-version:Date: Message-id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=hmxdMEJoDUVmZqEx1jmaaYxRw5wxn+veF6VTljGzrqM=; b=Gxl+mcZ61ZdNBAmrXmFrHPoHYV SPhGYniRX0O7IUfysFfFxnE9l9cfBkVEhQ7W68xq4cchYoLwbsfUTvqOoEcokHrbVHUxiCiCZj6Hs mLvQmxVqEo0gsNciGs6llZ6bfSJUP/3sIGfQGAYgbrZqNo9McUYXPNR0OBfWdkfV1EZKAbMYEg8eh GrXJuyZbx5y4Rw+OP3uCvZ0UKVQdQGatEjQlwGJwih/BYqAw0C7i02RMoE2PLuyFw1EdA78if8Rqe u6rshQ7iG1J7agP00dHoqq5hwmEK/XRzdVDRn7fxPD/DcPjF8ZRP0E2URsJfCAh/uuYYv4xjPhGau lH1sAyNw==; Received: by zero.zsh.org with local id 1opWEV-0002jD-T3; Mon, 31 Oct 2022 14:57:47 +0000 Authentication-Results: zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none Received: from mta01.eastlink.ca ([24.224.136.30]:49047) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1opWE2-00022p-CF; Mon, 31 Oct 2022 14:57:18 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta01.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RKM00BZ17JTIQ70@mta01.eastlink.ca> for zsh-users@zsh.org; Mon, 31 Oct 2022 11:57:17 -0300 (ADT) Received: from [192.168.0.2] ([24.207.18.108]) by Eastlink with ESMTPSA id pWE0oLB3gzeXppWE1ott8A; Mon, 31 Oct 2022 11:57:17 -0300 X-Authority-Analysis: v=2.4 cv=cYAU7FPM c=1 sm=1 tr=0 ts=635fe24d a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=6opZqEOhzWqhaTjtPwAA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrudefgdejtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeeitdejffevgfdtheeggfetkeeugeegieetuddtvddvudetteffvdevlefgueekudenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrddvngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <4f4fb806-fef1-52ba-2559-f2629c823939@eastlink.ca> Date: Mon, 31 Oct 2022 07:57:16 -0700 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: whence output varies with dot vs. realpath in $PATH Content-language: en-US To: zsh-users@zsh.org References: <8cfe03ee-cddc-f70b-0c62-b506e49dfe58@eastlink.ca> <249024aa-ae57-e970-ccf1-1d3c8a391417@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28294 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: On 2022-10-31 07:36, Roman Perepelitsa wrote: > I did prepend dot to PATH. You can see the full listing of commands in > my first reply. Yeah I noticed but I think our situations are different.  I'll bet you can duplicate my output if you tinker with your path. Sheesh, what else could it be?  Anyway that's a small matter, what's bugging me is the way whence doesn't show everything if the dot is not expanded.  Right now I'm doing this hack: oldpath=$PATH ppath=( $( realpath -s $path ) )                            # realpath needs spaces between dirs. PATH=$( echo $ppath | sed -r "s/ /:/g" )                    # put the colons back all_matches=( ${(f)"$( whence -mavS (#i)$1 )"} )    # fire up whence PATH=$oldpath         # restore PATH ... and I end up with 'everything' being found in the current directory.  Pretty horrible tho.  Dunno, what could I have done to make that necessary?  Seems to me whence simply doesn't look for files in a 'dot' directory.  Why else would expanding it change the output?  How could that be my breaking something?  Mind, I can break anything.