ebzzry / ebzzry.github.io

Creative Commons Zero v1.0 Universal
8 stars 3 forks source link

Error in functions and aliases #5

Closed nohwnd closed 5 years ago

nohwnd commented 5 years ago

I think this is incorrect, but I went here to get guidance how to write functions in zsh, so I might be wrong.

alias meh="echo foo" simply performs text substitution. That is, when Zsh encounters the text foo as the first token of the command line, it replaces it with echo foo. Nothing more. So, running: meh foo substitutes to echo foo

The example alias is meh and the substitute is echo foo, shouldn't this then be: encounters meh as the first token. And the example would show meh bar -> echo foo bar, because the first token is replaced with the whole substitute. Or alternatively the example would be just meh.

ebzzry commented 5 years ago

Yes, that is indeed a typo. Thanks.

Fixed.