Created
October 25, 2011 16:27
-
-
Save carlosmcevilly/1313341 to your computer and use it in GitHub Desktop.
destructively filter the paste buffer to find objective-c methods
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 | |
# doc-methods | |
# no arguments | |
# | |
# usage: load the docs for an obj-c protocol, select all, copy, then run this. | |
# | |
# on osx, takes the contents of the paste buffer and replaces it with | |
# only the lines from the paste buffer that look like obj-c methods, | |
# based on a really simple heuristic | |
pbpaste | grep ^[\-\+] | pbcopy | |
# next line is not really needed, but it's sometimes nice to see the results | |
pbpaste |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment