From: Seth Underwood <underwoo@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: Usernames with dots
Date: Tue, 14 Feb 2012 12:51:28 -0500 [thread overview]
Message-ID: <CAKvPa=ZxgtXCmEToWmFKqzp75-Bb5ueHiM4mAtkVzmgL5KDU7A@mail.gmail.com> (raw)
In-Reply-To: <120214085828.ZM21966@torch.brasslantern.com>
[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]
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@brasslantern.com>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@gmail.com
prev parent reply other threads:[~2012-02-14 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 15:12 Seth Underwood
2012-02-14 15:44 ` Peter Stephenson
2012-02-14 16:58 ` Bart Schaefer
2012-02-14 17:51 ` Seth Underwood [this message]
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='CAKvPa=ZxgtXCmEToWmFKqzp75-Bb5ueHiM4mAtkVzmgL5KDU7A@mail.gmail.com' \
--to=underwoo@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).