Skip to content

Instantly share code, notes, and snippets.

@epall
Created January 3, 2010 05:59
Show Gist options
  • Save epall/267844 to your computer and use it in GitHub Desktop.
Save epall/267844 to your computer and use it in GitHub Desktop.
using terms from application "Quicksilver"
on process text ThisClipping
do shell script "/Users/epall/bin/addreplacement " & ThisClipping
end process text
end using terms from
#!/bin/sh
replace=$1
with=$2
commands="Add :NSUserReplacementItems:0 dict\n\
Add :NSUserReplacementItems:0:on integer 1\n\
Add :NSUserReplacementItems:0:replace string $replace\n\
Add :NSUserReplacementItems:0:with string $with\n\
Save\nExit\n"
echo $commands | /Users/epall/bin/PlistBuddy ~/Library/Preferences/.GlobalPreferences.plist 2>&1 > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment