Skip to content

Instantly share code, notes, and snippets.

@n8henrie
Last active April 20, 2018 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8henrie/5182323 to your computer and use it in GitHub Desktop.
Save n8henrie/5182323 to your computer and use it in GitHub Desktop.
#!/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