On 2015-10-23 08:22, Allan Odgaard wrote:
I don’t understand you.
Variables set in TextMate (via Preferences → Variables, .tm_properties, or bundle settings) are exported to snippets and commands if and only if the first letter is uppercase.
They are exported to commands even if the first letter is lowercase.
The code you show above is ruby code for copying the value of the ‘FOO’ environment variable into ‘foo’. Don’t see how that relates to what TextMate exports to a subprocess.
Let's see if I can explain this:
1. TextMate executes a command in the RSpec bundle 2. That command is implemented in bash, containing inline Ruby code. That is, Ruby code is piped to a file which is then executed 3. The Ruby code runs the tests
All variables (defined in Preferences → Variables), regardless of case, are available at step 2. But only environment variables starting with a capital letter are available in step 3.