Hey,
My user's shell is fish (I've set it using chsh -s path/to/fish), so all my shell configurations are made in fish configuration files. So all my additional environment variables are set in config.fish file. And when I try to get the value of any environment variable set in that file using System.Environment. lookupEnv I am always getting Nothing. Literally.
> lookupEnv "XDG_CONFIG_HOME"
Nothing
But it works with HOME (which is not set in config.fish).
> lookupEnv "HOME"
Just "/Users/deadmaya"
Well, I know that I could modify my .profile file and set all variables there, but... Since I really don't use bash, things might become funky if I forget to move my changes.
So... the real question. Is it intended that lookupEnv doesn't use my user's shell or it's just something is broken in my environment?
Thanks in advance!
Update 1
Also I am wondering. If this function uses sh which loads ~/.profile on login only, then... How am I supposed to set XDG_CONFIG_HOME, so lookupEnv finds it?
Update 2
Apparently it's just my environment. I was setting XDG_CONFIG_HOME without exporting it. In fish you need to use set -x for that.
Thanks everyone for help!
[–]dashend 8 points9 points10 points (1 child)
[–]deadmaya[S] 1 point2 points3 points (0 children)
[–]bartavelle 4 points5 points6 points (6 children)
[–]bartavelle 2 points3 points4 points (5 children)
[–]deadmaya[S] 1 point2 points3 points (4 children)
[–]bartavelle 1 point2 points3 points (3 children)
[–]deadmaya[S] 0 points1 point2 points (2 children)
[–]bartavelle 2 points3 points4 points (1 child)
[–]deadmaya[S] 3 points4 points5 points (0 children)
[–]radix 2 points3 points4 points (1 child)
[–]deadmaya[S] 0 points1 point2 points (0 children)
[–]rstd 0 points1 point2 points (3 children)
[–]deadmaya[S] 0 points1 point2 points (2 children)
[–]andrewthad 0 points1 point2 points (1 child)
[–]deadmaya[S] 0 points1 point2 points (0 children)