Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATH fails with non-existing directory..
- X-seq: zsh-users 2980
- From: "Max R. Andersen" <max@xxxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATH fails with non-existing directory..
- Date: Fri, 24 Mar 2000 09:13:34 +0100
- Cc: "Max R. Andersen" <max@xxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <ui3em91h6cw.fsf@xxxxxxxxxxxxxx> <1000324045015.ZM3919@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: max@xxxxxxxxx
- Sender: max
> }
> } Im a rather new user of zsh, so bair with me if this is
> } a well known "feature" :)
>
> The well-known feature is that `path' (lower case) is an array and `PATH'
> is a colon-separated list. So when you did this:
>
> } % path=/usr/bin/:/nonexisting/name
>
> you told zsh there is only one directory named "/usr/bin/:/nonexisting/name"
> where it should search for commands.
>
> What you want is either
>
> % PATH=/usr/bin/:/nonexisting/name
>
> or
>
> % path=( /usr/bin/ /nonexisting/name )
>
> } Every other shell(sh,bash,tcsh) handles this without any error :(
>
> That's because `path' doesn't have any special meaning to sh and bash
> (so you didn't change the command search path at all in those shells)
> and tcsh doesn't actually use the `path' variable to search for its
> commands (it uses `PATH', which is merely copied from `path').
Ok - then a few questions arises:
1. In which order is path and PATH used ?
2. what can I do to convert a variable from colon-seperated list to an
array ?
e.g. do this: path=list2array(/usr/bin/:/nonexisting/name) => path=(
/usr/bin /nonexisting/name )
I need this as the university im using zsh uses colon-seperated lists
for their systemwide paths
Best regards,
Max
Messages sorted by:
Reverse Date,
Date,
Thread,
Author