From: Marlon Richert <marlon.richert@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: [BUG?] Accessing $userdirs (re)hashes all user dirs as named dirs
Date: Sun, 5 Dec 2021 21:39:23 +0200 [thread overview]
Message-ID: <CAHLkEDs+ph+48sT0NRcF9q60ySqtrb41VLHGFuJT6BT9DZp1Bw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7YHcFtZc2NGOde2322eRh2r5sWNCutOfoXZJXfCmNL_nA@mail.gmail.com>
On Sun, Dec 5, 2021 at 7:45 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Sun, Dec 5, 2021 at 1:35 AM Marlon Richert <marlon.richert@gmail.com> wrote:
> >
> > Almost none of these are dir names that I want or need. I don't think
> > this is desirable behavior. Is there a good reason for it to work this
> > way?
>
> $userdirs is literally nothing more than an API on the named
> directories hash table.
OK, but before $userdirs has been accessed, `hash -dL` outputs nothing
but the dirs I hashed myself. Normally, after doing `cd ~username`
exactly one entry is added to hash -dL's output. However, after
$userdirs has been accessed (as, for example, happens, when the
completion function _users has been called), the output is now
populated with ~120 usernames I don't want or need.
The same happens if I `hash -df`. Why would "rebuilding" this hash
table result in entries that weren't there in the first place? What is
the reasoning behind this?
next prev parent reply other threads:[~2021-12-05 19:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-05 9:35 Marlon Richert
2021-12-05 17:45 ` Bart Schaefer
2021-12-05 19:39 ` Marlon Richert [this message]
2021-12-05 23:24 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHLkEDs+ph+48sT0NRcF9q60ySqtrb41VLHGFuJT6BT9DZp1Bw@mail.gmail.com \
--to=marlon.richert@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).