Allen just created a fantastic command called
eop that makes it easy to create those commands that go to different URLs depending on whether or not a parameter is given (
example). The beauty part is that he fashioned it entirely out of existing YubNub commands. It is truly a work of art (and as with many commands, I haven't yet fully grokked how it works). Check it out:
ifthen -value1 {strfind -find ${token=@}${token=@} -string %s} -value2 0 -test equal -then {strreplace -find ${token=@} -replace -string %s} -else ${else}
It's as elegant (and impenetrable :-) as a terse regular expression.