Skip to content

Instantly share code, notes, and snippets.

@zackdever
Created February 21, 2013 00:36
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 zackdever/5000987 to your computer and use it in GitHub Desktop.
Save zackdever/5000987 to your computer and use it in GitHub Desktop.
when creating an arc paste (http://www.phabricator.com/docs/phabricator/article/Arcanist_User_Guide.html), automatically copy the address to the cilpboard on os x
alias arcpaste='arc paste | copyarcpaste'
#! /usr/bin/env python
import os
import sys
lines = sys.stdin.readlines()
sys.stdout.writelines(lines)
tail = lines[-1]
url = tail[tail.index('http'):]
os.system('echo "%s" | pbcopy' % url)
sys.stdout.write('Copied arc paste address to clipboard.\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment