Commands on steroids. Say what?
In the last few weeks, I’ve been quietly releasing a whole new world of command functionality, commands that have arguments and options. If you’re familiar with the unix command line then you probably understand what options do already. Arguments place values at differents points in a URL. A good example of this is the qshow command which takes you to a specific user command page. You simply need to specify a user and a user command’s keyword. For example:
- To go to my page and see my google command: qshow ghorner g
- To go to zeke’s post page: qshow zeke post
Options are similar to arguments but are well, optional. Let’s take for example our new google command with options. (You’ll need to update your command as explained in the last post to use the new google command).
- To search Google Books for thoreau: g -type books thoreau
- To search Google Products for mp3 players with 50 results per page:
g -type products -num 50 mp3 players - Of course you can still do your basic google search for your name:
g your name
Note: We didn’t have to specify a search type here since options can have default values.
As you can see, options add more functionality to your commands if you want it. So what happens if you don’t like using -type to specify search type and get tired of typing the same long arguments for some of your options? Set up your own aliases!
For the previous commands with options, my aliases shorten them to:
- g -t b thoreau
- g -t p -n 50 mp3 players
As cool as options are, they get even cooler when we apply them to web forms. Want to do an advanced Google Mail search? Try the gmas command. Want to text somebody right from your address bar? Try the txt command. To read more on what is possible with options and arguments read this tutorial.