3 ms·
Oftentimes I'll have something on the clipboard, so pbpaste | grep is good. But sometimes the thing I want to search for is long, such that I don't want to type
by salgernon 11y ago
Oftentimes I'll have something on the clipboard, so pbpaste | grep is good. But sometimes the thing I want to search for is long, such that I don't want to type it for the grep.
Fortunately, pbpaste takes a -pboard flag for selecting a different buffer. So cmd-e some text to put it on the find pasteboard, then 'pbpaste | fgrep --color -i "`pbpaste -pboard find`"'
I usually have this aliased to 'pbg'