Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Usernames with dots
- X-seq: zsh-users 16766
- From: Seth Underwood <underwoo@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Usernames with dots
- Date: Tue, 14 Feb 2012 12:51:28 -0500
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zzO37uFAf1+IcO5QvgX5Yhs4quzLdQXpVop89rbYOQE=; b=kAzP4u6hyTM3eO2i4tA/SRkob5MmIoQMZd2oaJHhlRhHX+DP4bhivw9FPweiltkeA1 m6TW1h/3H+qgUasgPawn1LZVo3hwWwIWapf8B3fLomTZLBzYXj7d9L2jZCanIlEPIbCr Ifqe6TlqdUtl/FrqJd66uaB99JEj9djDJoDNs=
- In-reply-to: <120214085828.ZM21966@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKvPa=aBhNYmtk32e03emnv9c93HQ=cMm4S7eMyeCkobunMj3g@mail.gmail.com> <120214085828.ZM21966@torch.brasslantern.com>
I apologize, it appears we are running older versions of zsh on some of our
systems. (Versions 4.2.6, and 4.3.6)
I just tested with two newer versions (on my laptop, and a new version
compiled on my workstation (4.3.11 and 4.3.15) and these both seem to work.
I will have to have the system admins install newer versions.
Thanks,
On Tue, Feb 14, 2012 at 11:58 AM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx>wrote:
> On Feb 14, 10:12am, Seth Underwood wrote:
> }
> } At my work, all user names have a dot (usually First.Last). This naming
> } convention causes the ~username shortcut to not work in zsh.
>
> I think you may be mis-diagnosing the problem. What does "to not work"
> mean here, more precisely?
>
> This man page bit that you quoted:
>
> } Static named directories
> } A `~' followed by anything not already covered consisting of
> any
> } number of alphanumeric
> } characters or underscore (`_'), hyphen (`-'), or dot (`.') is
> looked
> } up as a named direc-
> } tory, and replaced by the value of that named directory if
> found.
>
> That means that a dot is explicitly included among the characters that
> may come after a tilde as part of a user name.
>
> What does
> print -l ${(k)userdirs}
> show you?
>
> Any user names not included in that output will not be available for
> tilde-expansion. The userdirs variable is populated by querying your
> operating system for available user names, so if it is incomplete then
> the system is in some way preventing zsh from listing all the users.
>
> } Is there a way in zsh to change this behavior?
>
> I'm not sure I'm answering the right question because it's not obvious
> what behavior (or lack thereof) is wrong, but you can explicitly add
> the user names you care about like so:
>
> hash -d First.Last=/home/First.Last
>
> Replace /home/ with the appropriate path prefix for your environment.
>
> Other fixes (likely outside zsh) may be possible depending on whether
> $userdirs is incomplete and why.
>
> --
> Barton E. Schaefer
>
--
Seth Underwood
underwoo@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author