Well, what I was getting at was: how do you know the export didn't work? Was an error displayed? Was the wrong value shown when you did the echo? Was there some other indication?
I was just saying that the export command worked without a problem on my system (I usually try out commands before I suggest them). Essentially, what happens with that command is this:
- The text inside the $() is interpreted as a command to execute
- The command and the surrounding $() are replaced with the command's output
- The command's output is assigned to the PATH variable
- The export causes PATH to become an environment variable
So, to my knowledge, the export command should not have any influence on the assignment to PATH. If it's not working, then that might mean there is a case I should be aware of, or possibly a flaw in my logic.
It's not a huge deal. You say it's working if you just add another step; inconvenient, but workable. I'm just curious about it is all.