Yeah Way!

What's Different?

Welcome YubNub users! Thanks for trying out this new site. I look forward to hearing your thoughts and suggestions.

Before you get started I thought I'd highlight a few of the notable differences between YubNub and Yeah Way. Many things behave quite similarly, but there are some things that may behave slightly different than what you're used to.

1. What's Missing

There's some features of YubNub that Yeah Way! does not have yet. Hopefully I'll be able to get these implemented before too long.

  • Command Nesting
  • Converting GET to POST
  • Using other characters for spaces
  • Turning off URL Encoding
  • Command testing before creation

The flags shouldn't be too hard to implement, but command nesting has me a bit intimidated. But don't worry... I'll get it working! :-)

2. My Way!

You may have noticed that you can register as a user. This is not required, but does have a few advantages.

  • First of all... Don't worry, it's free!
  • If you're logged in when you create a command, that command is "signed" with your username.
  • Edit commands you've created (There are some limitations. More on that later).
  • Create private commands that only you can use (More on that later as well).
  • Easily keep track of all the commands you've created on your My Way! page.

3. Syntax

Parameters behave quite bit differently, so pay attention to this part. :-)

The primary (first) parameter is placed in the URL by using $1. For instance, the URL for a Google command would be:

http://www.google.com/search?q=$1

This would be used by typing g search_term. No surprises.

You can indicate additional parameters by using $2, $3, $4, etc. Take a look at this URL for a random number command:

http://random.org/cgi-bin/randnum?num=$3&min=$2&max=$1&col=1

To run this command, you would need to supply the parameters in order, separated by semi-colons. Such as random 100; 1; 5.

But wait! What if you want to use the familiar "switch" parameter style that YubNub uses? Simply add names for your parameters inside of square brackets.

http://random.org/cgi-bin/randnum?num=$3[num]&min=$2[min]&max=$1[max]&col=1

Now, in addition to the random 100; 1; 5 method, you could run this command using random -max 100 -min 1 -num 5. You can also add default values, like so: $1[max=100].

Let's take it a step further. What if we want to use abbreviated switches? What if we want to type -x instead of -max? All you have to do is put pipe symbols around the desired abbreviation in the param name: $1[ma|x|=100]. If we put it all together, we get something like this:

http://random.org/cgi-bin/randnum?num=$3[|n|um=1]&min=$2[|m|in=1]&max=$1[ma|x|=100]&col=1

So, how many different ways can we run the above command?

  • random
  • random 100
  • random 100; 1; 5
  • random 100 -num 5 -min 50
  • random -max 100 -min 50 -num 5
  • random -x 100 -m 50 -n 5

4. Domain Redirection

I noticed that the most common usage of the YubNub ifThen command was to go to the root domain of a command if no search parameter was given. For instance, the slash command: http://slashdot.org/search.pl?query=$1. Used with a search parameter, such as "slash firefox" the command will search slashdot.org for "firefox". But used with no parameter, wouldn't it be preferable to just go straight to http://slashdot.org/? This is what Domain Redirection is all about.

Commands run without a parameter will redirect you to the root domain of the command's URL, with a few exceptions. If the command is a "bookmark" command, without any parameters, naturally you will not be taken to the root domain. Also, if the $1 parameter has a default value Domain Redirection is disabled.

If Domain Redirection is not desirable for a particular command, put the flag (no domain redirect) or (ndr) somewhere in your command and it will be disabled.

5. Private Commands

If you are logged-in you can create (createp) private commands that only you can use. This is perfect for commands that would have no use for anybody else. For instance, you could create a command that goes directly to your own photos on Flickr.

Private commands are used just like public commands. If a private and public command share the same name, the private command takes priority. This makes it possible to do some cool things. Want the g command to search google.ca instead of google.com? Just create your own version of it. Make a weather command that defaults to your city. Create your own ls command that shows more commands per page than the public version. Go crazy.

6. Edit Commands

This is something I've always wanted. Logged-in users can edit commands that they've created.

To prevent abuse, there are some restrictions. These rules are subject to change based on feedback:

  • You can delete a command if its been used fewer than 8 times
  • You can edit a command's URL if its been used fewer than 20 times
  • You can edit a command's Summary if its been used fewer than 60 times
  • You can edit a command's Description if its been used fewer than 60 times

Once a command has been used 60 times, edits are no longer allowed and you'll need to contact me if you want to make any changes. Private commands can be edited at any time.


I think that's all the major differences. Let me know if you think I missed anything, or if you have any suggestions/problems.