Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG?] Accessing $userdirs (re)hashes all user dirs as named dirs



On Sun, Dec 5, 2021 at 11:40 AM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> Why would "rebuilding" this hash
> table result in entries that weren't there in the first place? What is
> the reasoning behind this?

The C-code interface for associative array variables (of which
$userdirs is a special case) requires that you are able to iterate
over all the keys of the array.  The keys in this case consist of all
possible user (home directory) names, so the hash table has to be
fully populated.




Messages sorted by: Reverse Date, Date, Thread, Author