-1

The first two lines of my .zprofile are:

export PATH=<value>

export PKG_CONFIG_PATH=<value>

The value of PATH is set correctly, but the value of second variable is empty. Is PATH a special variable in zsh which is inherited by interactive shells?

Solution: It was an error on my side. A had to login again for the zprofile to get sourced.

closed as unclear what you're asking by Gilles, phk, Sparhawk, Satō Katsura, Kusalananda May 25 '17 at 8:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What do you consider "correctly"? – Michael Homer May 24 '17 at 5:15
  • Does that file, or ~/.zshrc, set it further? – Kusalananda May 24 '17 at 6:02
  • +Kusalananda no it doesn't – saga May 24 '17 at 6:26
  • +Michael Homer by correctly I mean it containes the value I assigned it to in .zprofile – saga May 24 '17 at 6:27
  • By the last two comments, you contradicted yourself. – Kusalananda May 24 '17 at 7:14
3

You assigned nothing to PKG_CONFIG_PATH in .zprofile, so it should be empty. If PATH is also not empty after sourcing .zprofile, then PATH is being set somewhere else, possibly in ~zshrc.

Note that the syntax for setting PATH in zsh can include something like path+=('/apple/orange') to append and path=('/apple/orange' $path) (or path[1,0]=/apple/orange) to prepend.

However, somewhere you should find another export PATH if you want PATH to be exported to subprocesses.

Not the answer you're looking for? Browse other questions tagged or ask your own question.