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

Re: env variables



> More information please.

Here's some from me.



> In zsh, does
> % export | egrep "(CVSROOT|MANPATH|CLASSPATH)"
> list all three?

My problem is with cdpath (lowercase). I have modified my rc files to
do this:

    export cdpath=(. /usr/pic5 /usr/tmp)
    export CDPATH=${(j/:/)cdpath}

...so that both case-versions of the variable are defined. I noted that
when I set only cdpath, CDPATH wasn't automatically getting defined
as the documentation says it should. Hmm.

Anyway, cdpath still doesn't show up in my environment. This small
program gets NULL for "cdpath" but retrieves "CDPATH" just fine:

#include <stdlib.h>

int main(int argc, char *argv[])
{
    char *env;

    if (argc < 1) exit(EXIT_FAILURE);


    env = getenv(argv[1]);
    printf("%s\n", argv[1]);
    printf("%s\n", env);
    exit(EXIT_SUCCESS);
}

This is all in version 3.0.5.

--Nik



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