How to set boolean value in array object in plist

I am trying to change my settings for Textmate by changing its plist. Here is what I have so far:

defaults write com.macromates.textmate OakShellVariables -array-add '{value = "hello"; variable = "TM_HELLO";}'

This will add a new shell variable for Textmate. I want to do this via the command line so that I can script it. The above works fine, but I also want the activated key (which is logical) to be true. Unfortunately, I cannot provide the correct syntax to achieve this. All my attempts lead to the fact that the key is included as a string instead of a logical one. For instance:

defaults write com.macromates.textmate OakShellVariables -array-add '{enabled = true ;value = "hello"; variable = "TM_HELLO";}
+3
source share
1 answer

. , . , . , .

defaults write com.apple.dashboard layer-gadgets -array-add "<dict><key>32bit</key><false/></dict>";

:

  • <string></string> -
  • <false/><true/> - boolean
  • <real></real> - real
  • <integer></integer> -
+5

Source: https://habr.com/ru/post/1775168/


All Articles