Good afternoon everyone, recently I had here a question in which I was helped to solve my question about adding a new key-value pair to text replacement on macOS.
Now I've found a way to do it with just one command using the terminal:
defaults write -g NSUserDictionaryReplacementItems -array-add '{on=1;replace="uuuuuu";with="yyyyy";}'
Then I enter the following command to check if a new pair has been added to the general array:
defaults read -g NSUserDictionaryReplacementItems
Here we get a list of all pairs, and here we see that our pair has been successfully added:
},
{
on = 1;
replace = uuuuuu;
with = yyyyy;
}
)
And in the end, I ask for the following command to apply the changes:
killall -u $(whoami) cfprefsd
But after overloading the system when entering the command
defaults read -g NSUserDictionaryReplacementItems
The pair I added earlier is no longer there!
Tell me, is it possible to add new pairs to replace the text in this way? If so, how to apply the list changes?
I will be grateful for any help!