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=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7116 invoked from network); 11 Sep 2020 21:11:15 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Sep 2020 21:11:15 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1599858675; b=Y+xciElakz3ObhQ/KgPlvErBmuDzKjpmDMSVhJRgqHkhVyluYzHpBp0fq3eIKFZxw6H205XanA obdN9BOmyqa0rInR0SiTC7lczOyHh1Ts1338iKCxvfRK5abKpOGBAnWu2e2AVKHVSJQaR5xbiF uzWqK6HnqGqax5DObz2vRha8KzuQkGs9hY5YW1TP1BoTgwy0dN96g2jbzUvYfBv/TPWQcZ/sio 6ZxtNk7BVSojMY7jzkL4HRilp74x3ejguG7tFMs4Q1WganRsFUGSV1eG42zpoXt3I+QYyeq2y7 LdpGJdolY1a31S6f8h913Ds9/6fXOqchcVO04FNHdUbzHQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 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-20200801; t=1599858675; bh=eToiraSiKDPNd7uTVhv4zRsG4cFB3+4Mcip1lnqyUwY=; 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=o2DXg0KWZswaprdr/kw/+MzO9hf0ct44uKKApnYG8mAm5uVvZoaWsnaJn1La4VqbCSrVza7I2e Dg+T991adAIt7qsHpcltywWrQ2lS3oTdrJaG1weBPSDoj7UkcNx3X6fw4syAfgfVRCttz+u1mf rzovQJ5Pb6l1Ffl9ABqc4GFQOqTCXnSkyQpW8XUMUxpZr3LQRpaFmwkdm+eVG3jrA/8f0j4TnK kZHB+p+bTwKX5SNmgs3FKN0JMjEkNxnoB/kc0nwqa41jvMfhkb0VNrCGZCYIiodBuHteZz/x4G YmlncMR5oKrGn5BONI7ssxt0Jy1qyDqXCp3pVGny4tmX2g==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; 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=tBvRjV6rK82eu46Dlb/zR9z4UfYBGkEJ6+WfHtrQcAY=; b=vfixfvlMkayO+kVRq11gvlhP9A esEKFQS77A6+mudShsTY8DAL7PQSoLOq/aGiDnN2SshCZZTNqf7YT57fZXBOQMjtenb8qAhov3Bfp 5FNCh755WcZLNGSODD/4XxTHZACL9HOkcpRBL9ZZOeIj9FOxRdc2S8C4F761w3RQn2L4dhSlS28RT F0RWgEyjiPyGPhmxU5FwMpUpp75WqL9Ec9WBwBQVDhl8pJwkgf6+IYRMnLS1bFiAU5topViW+NRwN YFxdExEXAGjMQv/bFcjsXopfaAWAR2wFnI7mNvWLCWYbLT8MmytijexaVb73GBZdkLME+Cf/+0cRe 6K3PxP/g==; Received: from authenticated user by zero.zsh.org with local id 1kGqK6-000DY5-Pi; Fri, 11 Sep 2020 21:11:10 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f176.google.com ([209.85.167.176]:34875) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kGqJh-000DOC-QA; Fri, 11 Sep 2020 21:10:49 +0000 Received: by mail-oi1-f176.google.com with SMTP id w16so10813796oia.2 for ; Fri, 11 Sep 2020 14:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tBvRjV6rK82eu46Dlb/zR9z4UfYBGkEJ6+WfHtrQcAY=; b=scsg2e/OmMtW3tYRj3NeajhKhInKnBpqnpPxpD6dhHGn8VzsoWde++MbwY/YCeLM+v P2f/XmrF8V7M7DFa0NQ1LJRlt8bcz1ml82WzLOUEWkZwDze0qVdjY6FEAt5fTaRterQO uxdsWaS3kkNijw9Tt8nfzd6kSkTp51JeJk29OQVZ1/ecBMGDYOYSSSwux1eeeeVAfogw bAuiKLjG44D4VXoQNkwLPCjfWJlvqsnsm1U5awLC57YlSJZnk7YHOL90NLFi12e7ayqt nVE4+i/GYgcRk3miNm6LpNueJwqTL6GLSu+PPS0YwA9sYwb2tdyVz9K/7AzvLQkFr41Y WSMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tBvRjV6rK82eu46Dlb/zR9z4UfYBGkEJ6+WfHtrQcAY=; b=Kn6VVjvM7BMMgtl8OoFg/B8jIHO0tlB+y5Ttn0Yzkq3lO7HBZvA4RRy36EoatEJSde AMb+MDaT4MwtF7yQsN2cVS/jXs2iwQ9aHf/ZVkQwbQVWJVJZ5GBtximr706+n96ZFNe1 Zi+aJQCoAZpg1cPTYRztcoaHD0E8PX+E3Mqg89Np/2HaND4mtmSH4DME8TvePCg2+3tB Xl2grl6tz2hswXE30x70FoPRfL0zGwgf7x3d0y2RcmMSA1Ss4bIWUrSRCHPxqplAu3Qq gcHJEJyq43wW1eGR46kCtAXDq5LTxmm48T2VOcd3pjlqP5HB903lNkbRUU0533H+HPBU A4zg== X-Gm-Message-State: AOAM530p4mj0ugcx4oDwIGSDlegnt7qIrb8pO+SdbpCvr2Issrw7sa0q 7xytLC/PEVpdYS58K36vYCVJan2IMO4wlgRvPsB0sQ== X-Google-Smtp-Source: ABdhPJw6M3x8xKMjMfRxYYdL8hBrvXPZIF8cEpIeLL+5o6HElme4LwXwY2pjNx+Te12NawXrnVpnLxcMVrprztVN4tY= X-Received: by 2002:aca:3ac6:: with SMTP id h189mr2486506oia.132.1599858644077; Fri, 11 Sep 2020 14:10:44 -0700 (PDT) MIME-Version: 1.0 References: <20200911144852.GA1669764@fullerene.field.pennock-tech.net> <20200911161000.GA1679994@fullerene.field.pennock-tech.net> In-Reply-To: From: Bart Schaefer Date: Fri, 11 Sep 2020 14:10:33 -0700 Message-ID: Subject: Re: Possible bug: HASH_CMDS has no observable effect To: Roman Perepelitsa Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47371 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Fri, Sep 11, 2020 at 9:33 AM Roman Perepelitsa wrote: > > Why isn't rsync hashed the first time it's executed? This is usually because of HASH_DIRS: Whenever a command name is hashed, hash the directory containing it, as well as all directories that occur earlier in the path. Once the cache has been pre-populated by hashing a directory, HASH_CMDS stops attempting to search that directory for new additions. A "rehash" is needed to discard the cached directory and reload any new commands that are now contained therein. If you unset HASH_DIRS you might get what you want. A complication of this is that the completion system also invokes command hashing in order to be able to use the $commands associative array. So if you use completion at all, you might also find that command (re)hashing works differently than in a "zsh -f" shell. Refer to the description of "rehash" under "Standard Styles".