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

Re: zsh for win32 - installation of zshrc



On Sep 15, 11:00am, Amol Deshpande wrote:
> Subject: RE: zsh for win32 - installation of zshrc
> 
> > (I also put in HOME=$HOMEDRIVE$HOMEPATH; what was the reason
> > for not defaulting $HOME from this on NT 4+ ?)
> > 
> each user is guaranteed to get a different $USERPROFILE, while I don't think
> the $HOMEPATH changes unless you specifically set it for each user.

Ah, this is correct; it appears to default to \ if not explicitly assigned
by the administrator.  So here's what I have now:

[[ -n "$HOMEPATH" ]] && export HOME="$HOMEDRIVE$HOMEPATH"
[[ -z "$ZDOTDIR" && "$HOMEPATH" == [\\/] ]] && ZDOTDIR="$USERPROFILE"

This makes ~ sensible for users whose HOMEPATH is set e.g. from the user
account manager, while looking for init files in the USERPROFILE for any
user that doesn't have a useful HOMEPATH.

A couple of other remarks about using zsh on NT:

"setopt correct" is worthless because it uses the full file name (e.g.
"foo.exe") when trying to correct the spelling of a command ("foo") and
therefore complains about nearly everything except builtins.  (This is
probably fixable by playing with hash/unhash commands.)

"setopt winnt_ignore_case winnt_lame_path_fix" seems to be a pretty good
idea.  I'm not sure exactly when "winnt_convert_backslash" is important.



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