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

Re: ~/.zshenv or ~/.zprofile



    Hi Dan :)

 * Dan Nelson <dnelson@xxxxxxxxxxxxxxx> dixit:
> In the last episode (Sep 07), DervishD said:
> >  * Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx> dixit:
> > > I'd like to change the StartupFiles/zshenv file so that it doesn't
> > > recommend setting the "path".  How about something like the
> > > attached patch?
> > The patch and the explanations seems to be quite useful. Anyway: what
> > is the proper place to set up the "path"? I mean globally not
> > per-user (that is, not ~/.*).
> My global path settings are in zshenv, because that's the only one read
> from scripts when your original login shell wasn't zsh and from cron
> jobs.

    Well, that was my doubt ;))
 
> path=(/usr/local/bin
> typeset -U PATH

    Good solution! Just one more question: if the user runs, as in
the example, 'PATH=whatever gdb program', this is because the user
wants JUST that path, no more, no less. Shouldn't be a better
approach something like:

    [[ -z "$path" ]] && path=(mypath $path)
    typeset -U path

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/



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