I'm trying to add a function to my .bashrc to ease prepending $PWD to environment variables. I'd like the function to take one argument -- the name of the variable on which to prepend the working directory. I'm thinking something like this...
function prependTo{ export $1=$PWD:\$$1 }
Is what I'm looking to do possible in bash?