How do I use defaults to access a specific field in a dictionary? I've tried doing this

$ defaults read -app Terminal "Window Settings.Pro"

but it doesn't work. Accessing "Window Settings" on its own does work though, and Pro is a key in that dictionary.


defaults isn't capable of doing this.

One of the options you have is plistbuddy :

/usr/libexec/PlistBuddy -c "print 'Window Settings':Pro" ~/Library/Preferences/com.apple.Terminal.plist
  • 1
    Is there a way to "refresh" the terminal after making a change? Because it doesn't seem to be committed. Reading the value shows it has changed, but the terminal doesn't reflect that change, and opening its settings also shows the old value.
    – Ron
    Jun 17 '15 at 17:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .