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

Re: Always showing short home directories



Christian Taylor <cht@xxxxxxxxx> writes:

> Hi everyone,
> 
> zsh displays the home directories of users in a shortened form (in a suitable 
> prompt), but only after zsh "knows" about them, for instance after actually 
> using the directory name in the shortened form or after doing a completion 
> like this:
> % cd ~<TAB>
> 
> What would be the best way to let zsh figure this out already when it starts?

Put:

        : $userdirs

In your zshrc.

Be forewarned that this will enumerate all the passwd entries in your
system.  If you're in a networked environment using nis/yp or ldap
with more than a few hundred users, this stanza could take a while to
run and use a lot of memory.

Phil.



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