Text Replacement settings managment

matias101
New Contributor

Hello I've been trying to figure out a way to update / add words to the Text replace preference pane with no luck. the only way I can make it work is:
1)manually adding to the list
2)following this also manual process https://support.apple.com/en-us/HT204006

I have tried:
http://apple.stackexchange.com/questions/114222/how-can-i-add-autocorrect-shortcuts-programmatically
&
http://apple.stackexchange.com/questions/110776/writing-to-nsuserdictionaryreplacementitems-with-defaults

I can make it work for one instance of opening an app like TextEdit, but it is almost immediatley overwritten and if you open the Text tab of the Keyboard preference it is never there because I assume it's being overwritten. This is the code that works briefly:
defaults write -g NSUserDictionaryReplacementItems -array-add '{on=1;replace=foo;with=bar;}'

Trying this on 10.10 and 10.11. any help appreciated, not sure what I am missing. I have tried disabling caching before and after the above command with sudo killall cfprefsd and also killing AppleSpell process as well to no avail.

0 REPLIES 0