Skip to content

Instantly share code, notes, and snippets.

@carlosmcevilly
Created October 25, 2011 16:27
Show Gist options
  • Save carlosmcevilly/1313341 to your computer and use it in GitHub Desktop.
Save carlosmcevilly/1313341 to your computer and use it in GitHub Desktop.
destructively filter the paste buffer to find objective-c methods
#!/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