[TxMt] defaults OakShellVariables

Allan Odgaard throw-away-1 at macromates.com
Wed Nov 2 14:33:01 UTC 2005


On 02/11/2005, at 14.48, Simon Gregory wrote:

> I'm looking for an easy way to add a shell variable to TextMates  
> preferences via a shell script, I've got so far but the final step  
> seems a little illusive.
>
> The following just overwrites what's already there....

You want to specify the value using '-array-add', e.g.:

    defaults write com.macromates.textmate OakShellVariables \
       -array-add '{enabled = 1; value = "/Users/simon/classes";  
variable = "CLASS_PATH"; }'

> As the script would run as part of a bundle package install it  
> would be possible to quit textmate first and not run the risk of  
> defaults confusion, but ideally I'd like something similar that  
> could simply be executed via a command.

Unfortunately there's no way to have two applications “use” the  
defaults at the same time (w/o the risk of having one flush and  
overwrite changes done by the other).




More information about the textmate mailing list