supergra answered the main question, but this may make you wonder why you see that your text was repeated to you, although the variable was not set. That is, you have echo $x at the end of your alias, and indeed you see no when entering oh no , but this does not mean that the echo is reflected in the variable.
What happens is that echo prints the (empty) variable, but then echo also captures the "no" part separately. If you do alias tmp 'echo $1' and try tmp hi , you will say hello because it is as if you made "echo $ 1 hi".
To make this clearer, try alias tmp 'echo abc $1 def ' and again tmp hi and you will type "abc def hi". Again, if you try alias tmp 'echo $1 & which ' and use it again, you should if you don't have a command named hi , see Something like "hello: command not found". or if you run tmp ls , you will see the output of which ls .
Another example: try alias tmp 'echo $1 & ' and tmp hi to make sure that it is really trying to execute hi , as if it were a command that could be dangerous if you weren't expecting it.
Aaron source share