q is for query
q is a small tool for performing repetitive tasks from the console. Where you use rake to automate a project’s tasks, you’d use q to automate your own workflow a little. q commands are relatively free-form, with a few built-in ones that I use frequently enough:
Searching via Google:
q search search terms
Searches for the passed-in terms on Google. Synonyms are
google
,g
.Looking up Wikipedia articles:
q wikipedia toast
Looks up the named article on Wikipedia. A synonym is
wp
.Looking up Ruby core class docs:
q ruby Hash
Looks up the docs for Hash on ruby-doc.org. A synonym is
rb
.Looking up Cocoa/related documentation:
q ns Array
Looks up the docs for NSArray in the on-disk filesystem (uses globbing to find them); therefore it doesn’t require an internet connection and finishes very quickly. Synonyms are: ca, cf, cg, dom, eagl, gl, glu, ib, qt, ui, web.