1

How do I write a value inside a named profile, like so;

defaults write com.apple.Terminal "'Window Settings'.Basic.shellExitAction" -int 1

Obviously this doesn't work and also tried multiple variants, like writing in array/object style with [name][sub_name], but none seems to work and I can't find the logic in the documentation.

1 Answer 1

0

I used PlistBuddy instead;

readonly plist_file="${HOME}/Library/Preferences/com.apple.Terminal.plist"

/usr/libexec/PlistBuddy "${plist_file}" -c "delete :'Window Settings':Basic:shellExitAction"

/usr/libexec/PlistBuddy "${plist_file}" -c "add :'Window Settings':Basic:shellExitAction integer 1"

You must log in to answer this question.

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