Hello,
I'm trying to establish a dynamic environment variable (in my Cygwin .bashrc) from the $PWD, something like :
alias TEST="export Variable='$(cygpath -w $PWD)\DIRECTORY'"
When I call TEST, the PWD it uses is the PWD from when the .bashrc was last sourced (so if I've changed directories, it doesn't give me the current $PWD [verified by changing directories, then "$ env", then "$ TEST", then "$ env"]).
I've found I can get it to spit out the right $PWD if I add source ~/.bashrc to the beginning of the alias, in front of the variable export, but then I lose information from other aliases I've performed (like exporting other environment variables).
Does anyone know the reason for this and how I can create this variable from the pwd?
joryte
