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,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9339 invoked from network); 31 Oct 2022 21:18:57 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Oct 2022 21:18:57 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1667251137; b=oLRBjF4B1PK1/Jrl+YcktLGqJDf6GJ3ZEwvVq+ZOptiOjqtsYUCBfcuRmm+wE/wUMlBFhGQDpZ h3K50tdEP9dHWNLniA0fzL1G9kraD6zCHnKk9swmd9rOIcwkKV/3UPUzwILuVl0HpjPBK9ghy3 1NRDvqWWgC6AYlGeocIYAuYdYir9iySVkWLS/cMavUOSMf2XBpqPYawaSugKXJniuLyygII66O +Lpfw6+F6y5Qiw3p7zFi949zsTNJRxzNTUoRDLbeD7tuW8etz56vayy0awMwpsUXqV9BHQYOgy QfvtqMXllG8093KL5f/iWv1HSGUztlLwvQfYF9h8gwJUyA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f43.google.com) smtp.remote-ip=209.85.218.43; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1667251137; bh=O/JjB/7a3qBFaMXe+11SDhgmSk25XsGfipU3qdWYTsg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=m3mGtGG9hSRLKGzCdZspFzBDqV6nqjtHwSVcpgiMlqVL4uMo5xU+NrFTddlh4yD1py5CdnzBkN kIvvLSHBJpXCl90zhqUEcADoNcHSkPgUShCTwuxZYlsIrY2Oacz43t+DlMl6EF2iXDBUtI9sGX ocTdrKDZK9qjaOpOh0UmEPLNGWGs9jI4JO3qwQfK9FbIARMZp9KgBXPd1n7i+SFr5SJ09WY11A lYgVWoQKzWUYctqvFu8NH4+XLyIECPiaqbGs3fQCcxBgylXAQfoAosOdkHs0YccxYqErJnyFju wqr24o2BgvQF8N0eBYXRWkQwHzF0pXQrJSrPD7Ba5oRV4Q==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=oHpwicfyyXB691pS73Ijc+eBp9+doUSougp1NLl6T9A=; b=lAe0gzLttJW983h65iPd8KpVJe gnEtnllZ9LjFpFVdrtHr/ul/3vbHgn7E+ijSALCVB5VZKdnhWSlH3IvdLdHjsJEfRWZBW28foJyIZ lb3fuxG/2qx8UzoamWeT1AOo6yG/V/L5TsG1KJ8kup6CFfWMWnbwC3TKNHfJEByQo31Vcu+QMgMCf naRUwzfy0OP6CdfcSfL1U8kaMZZjeBys/H1HflBQ2YUZbNLL0bgJv8F2FxDKUgDeP5gZMpiqEqz5J +Jv3O3N1xUdFAFoSUl8nQhBxt+EvDQDbAPGRGJzKIsF3YbI7L7W5/aEzTR6EcjeHo49a1LCQWrBYE 8lxY+ufQ==; Received: by zero.zsh.org with local id 1opcBL-000Cf8-2i; Mon, 31 Oct 2022 21:18:55 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f43.google.com) smtp.remote-ip=209.85.218.43; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f43.google.com ([209.85.218.43]:37568) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1opcAg-000BvY-Ac; Mon, 31 Oct 2022 21:18:15 +0000 Received: by mail-ej1-f43.google.com with SMTP id ud5so32646354ejc.4 for ; Mon, 31 Oct 2022 14:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oHpwicfyyXB691pS73Ijc+eBp9+doUSougp1NLl6T9A=; b=cD2F9gOZdO5gM5aEJAdqNSKbYJCMlqh0Q+gII4T5q03y6KFwc90OxeTANQNv1I5gQ2 QGuocXJwUkLGlPHcX2Lt+Ncp7bb1M3yDF7YwFEnM3Wqc2ey2KN6Vgduy2sUTIMmeTbrM zVeP9VUVQtVg2aMzyDIEJv0U+jlSb7UhhshrviuHpZVg37luwSdzEaMKTaj4j5ZRwmdh KzdRWHUk5mEQ/iyUw6Nvbh/De69lfXvtTpMr44TdzRF+lyB0WNK0AjMDES7EJVQFVjRu ogbL6WsSt8SABqPwgliLklYJCVCUAPss32FHbMOlJXu25ZjoOIctBiCOdCA/oyZCN/e4 Ohrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oHpwicfyyXB691pS73Ijc+eBp9+doUSougp1NLl6T9A=; b=JqfnuVEHUd6lk2DtWT2tjXRWvVMSVNXW6x8NvNQX9q1ZyHVbE401MvBr6m0AdDFx7y vAHofpiarPbgr/6YKuHyhR/wCsTGQ9iD8qloLb742WIoixfs8rNW/g5a0IU90lVpD8kX XyBJo+f2B6mVFUGMebjPTaCB8JFWkmQ6kfUD15rip8fKuB3seLlzhYr1UHlok+QqJyGe SqYQcrJOuQByWmNXdP869AdkzoA6BOWONkvn7chuviwYo942kdwzw88h/y21TdiytKl9 UNATuUHzGtkG9V0LNVbqXE9mVYWA2+Nrm+9MC6m2JrsP1iay9YVLQe2bDmxQbVgaFap6 iKxQ== X-Gm-Message-State: ACrzQf1m+wgDnBvICX6ihVzlpPH+FUR2V2Z+9K4M1QBh7LIekKGgO8q8 +8FcsgzENP/BURt/9WzDondqIEgfpjqF1smuE6xUBg== X-Google-Smtp-Source: AMsMyM6DJAj2J3+Mdp2Qvdt/4rE3KarrxYKtVDaao4UFXDeqvncFhC5IZnqviwuYkTocOcHwr+CNCOrYQeWyG2CKUnY= X-Received: by 2002:a17:907:8d07:b0:7ad:cdf2:7b66 with SMTP id tc7-20020a1709078d0700b007adcdf27b66mr7656044ejc.699.1667251093740; Mon, 31 Oct 2022 14:18:13 -0700 (PDT) MIME-Version: 1.0 References: <8cfe03ee-cddc-f70b-0c62-b506e49dfe58@eastlink.ca> <249024aa-ae57-e970-ccf1-1d3c8a391417@eastlink.ca> <4f4fb806-fef1-52ba-2559-f2629c823939@eastlink.ca> In-Reply-To: <4f4fb806-fef1-52ba-2559-f2629c823939@eastlink.ca> From: Bart Schaefer Date: Mon, 31 Oct 2022 14:18:02 -0700 Message-ID: Subject: Re: whence output varies with dot vs. realpath in $PATH To: Ray Andrews Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28295 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 Mon, Oct 31, 2022 at 7:57 AM Ray Andrews wrote: > > 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? It's the -m option. If you ask for a pattern match, "whence" rebuilds the internal command hash table from the path and then does the matching against that. However, "." is never used when loading the hash table because it would become invalid as soon as you change directories. If $PWD is actually in the path, then those commands DO get put in the hash table, so whence reports them. This should probably be clarified in the documentation -- whence never does globbing on actual file names. You don't see this as a persistent condition because you're running "whence" in a subshell with $(...). The "zsh is zsh" output means you have an empty path element, e.g. two consecutive colons in $PATH or $PATH begins or ends with colon, and an executable or link named "zsh" in the current directory.