Basically, what I want is to have a variable that contains e.g. $(some-command), so that it provides the result of some-command at the time it is expanded.
An example would help clarify what I mean.
Suppose I have some command tell-svn-root which prints to stdout the path of the most recent (i.e. deepest) ancestor of the current directory that contains a subdirectory .svn.
I would love to create a variable SVNROOT that always evaluates to the output of tell-svn-root.
SVNROOT=$(tell-svn-root) in .bashrc won't work because then SVNROOT will have a fixed value (namely the output of tell-svn-root when .bashrc was run).
A function that runs e.g. cd $(tell-svn-root) is also insufficient because I'd like to write commands like cd $SVNROOT/my-app-src.
I know that I can do $(tell-svn-root)/my-app-src, but typing those extra parentheses does slow things down a bit since it involves two characters up on the numbers row of the keyboard rather than just one.
I can't find a good answer for this, so I suspect it might be impossible.