When defining "static variables" in Preferences->Advanced->Shell Variables, is it possible to include the values of static variables in the values of others?
For example, I tried defining:
P1 /some/path P2 $P1/subdir
But the value of P2 is "$P1/subdir", not "/some/path/subdir" as I wish.
-- Daryl Spitzer
On 8 Nov 2007, at 17:43, Daryl Spitzer wrote:
When defining "static variables" in Preferences->Advanced->Shell Variables, is it possible to include the values of static variables in the values of others?
For example, I tried defining:
P1 /some/path P2 $P1/subdir
But the value of P2 is "$P1/subdir", not "/some/path/subdir" as I wish.
That is not possible -- in the future it will be possible to use format strings for variable values (which can refer other values), but in your example the variable you want to use is from the same list, and that won’t be possible (i.e. it would have to track dependencies between the variables to resolve them in the proper order for that to work.
Allan writes:
That is not possible -- in the future it will be possible to use format strings for variable values (which can refer other values), but in your example the variable you want to use is from the same list, and that won't be possible (i.e. it would have to track dependencies between the variables to resolve them in the proper order for that to work.
What if one could determine the order of the variable definitions? Then it wouldn't be necessary to track dependencies, as long as the dependencies are always on variables defined previously in the list.
Sorry it took me so long to reply. (I'm finally making time to work towards the bottom of my inbox.)
-- Daryl
On Nov 10, 2007 11:44 PM, Allan Odgaard throw-away-2@macromates.com wrote:
On 8 Nov 2007, at 17:43, Daryl Spitzer wrote:
When defining "static variables" in Preferences->Advanced->Shell Variables, is it possible to include the values of static variables in the values of others?
For example, I tried defining:
P1 /some/path P2 $P1/subdir
But the value of P2 is "$P1/subdir", not "/some/path/subdir" as I wish.
That is not possible -- in the future it will be possible to use format strings for variable values (which can refer other values), but in your example the variable you want to use is from the same list, and that won't be possible (i.e. it would have to track dependencies between the variables to resolve them in the proper order for that to work.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 13 Feb 2008, at 16:41, Daryl Spitzer wrote:
Allan writes:
That is not possible -- in the future it will be possible to use format strings for variable values (which can refer other values), but in your example the variable you want to use is from the same list, and that won't be possible (i.e. it would have to track dependencies between the variables to resolve them in the proper order for that to work.
What if one could determine the order of the variable definitions? Then it wouldn't be necessary to track dependencies, as long as the dependencies are always on variables defined previously in the list.
That should work, yes -- I’ll make a note of it.