How to avoid restarting macOS after running `defaults write LaunchServices LSHandlers`?
I have changed default application opening specific file type using defaults write but for that to work I have to restart macOS. This feels unnecessary. Are there other options?
I've tried relaunching Finder, sudo pkill -1 Dock, and
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/\
lsregister -kill -r -domain local -domain system -domain user
without success.
Example command to change default app:
defaults write com.apple.LaunchServices/com.apple.LaunchServices.secure LSHandlers\
-array-add '{LSHandlerContentType=public.shell-script;LSHandlerRoleAll=com.sublimetext.4;}'