sunslayer commented on a Page, YouTube Search  -  Dec 27, 2009

you should use /var instead of /set so you don't need to unset it
the first 2 if statements are unneeded as $replace($1-,$chr(32),+) will only change the space character and not any other

else if ($1 == $null) { echo nothing entered, halting } { halt } 

should be

else if ($1 == $null) { echo nothing entered, halting | halt } 

but the halt is redundant.

alias yt {
  var %ytsearch = $replace($1-,$chr(32),+)
  if (%ytsearch) { run http://www.youtube.com/results?search_query= $+ %ytsearch }
  else { echo -a nothing entered, halting }
}

is a simpler way to do it

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.