Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh for win32 - installation of zshrc
Quoting Amol Deshpande (amold@xxxxxxxxxxxxx):
> > Furthermore, the README does not give explicit examples which it should.
> Feel free to write some up and i'll put them in.
I am trying! I am trying!!
> > > 7. HOME directory:
> > > -----------------
> > > zsh sets the HOME directory if it's not already set. It uses
> > > the windows directory on win95, $HOMEDRIVE\$HOMEPATH on nt <4.0,
> > > and $USERPROFILE on NT 4.0 and higher.
> > > If ZSHDOTDIR is set, zsh sets home to "youdonthavehomeset". This
> > > is to avoid crashing in places where the shell expects a home directory.
> > > Picking a real default would defeat the purpose of not setting home.
> > > (that means you can set ZSHDOTDIR instead of HOME for your startup
> > files)
> > Well - what is the difference between these methods?
> You can set ZDOTDIR if you don't want the shell to set HOME
> (and you haven't defined one yourself.)
> This is because other unix ports may expect HOME to NOT be set
> (they use their installation directory or something).
"or something" - what about the zsh then?
> > What is the "windows directory" on Windows95
> > (ie how is this defined in a Windows setup)?
> c:\windows by default. or whatever directory you installed win95.
Does the zsh look explicitly into the directory "C:\WINDOWS" then?
If not then how does it determine this value?
What if I have installed both Windows95 and WindowsNT on my disk?
Which directory gets checked first then?
(This is not just a theoretical issue!)
> > Anyway - this is what I understand so far:
> >
> > Windows95: C:\WINDOWS\.zshrc
> > WindowsNT-3.x: $HOMEDRIVE\$HOMEPATH\.zshrc
> > WindowsNT-4.x: $USERPROFILE\.zshrc
> > $ZDOTDIR\.zshrc
> > $HOME\.zshrc
> > Is this correct now? For WindowsNT-4.x -
> > in which order are the various locations checked?
Well, is the order of these checks correct or isn't it? YES or NO?
> Remember that these rules apply only if don't set HOME. Since there is
> no /etc, only the rules for locating files from $HOME are followed.
I remember that some incosistencies with the
manual had been discovered recently on this list.
So - what is the complete/correct set of rules here?
> 1. If ZDOTDIR is set, the shell will not set HOME. Since this may cause the
> shell to crash in various places, zsh sets home to a bogus value that gives
> you a clue about that went wrong, instead of crashing.
Now, this is a contradiction in itself.
Does the zsh set HOME now or doesn't it?
> 2. If ZDOTDIR is not set, and HOME is not set,
> then zsh sets home to the directories above.
This statement in unclear. Does the zsh set HOME,
and if so, does it change its value to a list of dirs in turn,
stopping at the first dir where it can find a zshrc?
> > The value of a variable on Windows cannot be used as $VAR (I think)
> > but needs to be specified as %VAR% - and this is only possible in batch
> > files.
> > Right or wrong?
> the way you use a variable is a function of the shell you use.
> since you are using zsh, you use the zsh syntax. it has absolutely
> nothing to do with what operating system you are running.
On the contrary! The OS determines the kind of setup I have to use.
And its syntax determines how I can access the value of variables.
And from the non-description it is still not clear to me where I would have to
set the variables HOMEDRIVE and HOMEPATH - therefore I do not know whether I
should set them with the autoexec.bat and whether I would have to use the
syntax of command.com; I hope this makes the problem more clear now.
I suppose that these variables are not set within the zshrc as
they are supposed to determine the location of the setup file.
> > I am looking forward to a concise but precise description ...
> you can:
> 1. read the README
> 2. read the changelog
> 3. email me.
> 4. read the source
The README is very concise and not at all precise,
the changelog was pretty useless (as I remember),
and emailing you is what I keep doing as I hope
that this will be faster than reading the source. ;-)
> I know there should be more comprehensive documentation of the quirks
> in this version, but i just haven't gotten around to it. sorry.
Well, this is your chance to have your info compiled by me.
But I wonder whether it wouldn't be easier to write it up
yourself in pseudo source style, eg like this:
WindowsNT-4.x:
if $HOME
then test $HOME/.zshrc
elsif ZDOTDIR
then test $ZDOTDIR/.zshrc
else test $USERPROFILE\.zshrc
I just need something like this.
Sven [tempted to start reading the source
- but too tired now at 4:15am]
Messages sorted by:
Reverse Date,
Date,
Thread,
Author