Last active
April 20, 2018 21:34
-
-
Save n8henrie/5182323 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euf -o pipefail | |
# For more information: http://n8henrie.com/2013/02/2021/send-drafts-ios-content-to-quicksilver-or-clipboard-on-osx | |
# If file is empty just exit | |
[ -s "$1" ] || exit 0 | |
# To send it to the clipboard: | |
# pbcopy <"$1" | |
# To send it to Quicksilver | |
/usr/local/bin/qs <"$1" | |
# This line deletes the file | |
# rm "$1" | |
# This line empties the file contents (useful if running as a launchd `WatchPaths` script) | |
echo -n > "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment