On Sun, Aug 15, 2021 at 2:00 AM George Nachman <gnach...@llamas.org> wrote:
> Defining an alias named `done` breaks parsing a for loop that does not have > an `in word` clause. > alias done="" > Works for me: $ set -- a b c $ alias done='echo hi; done' $ for x do done hi hi hi Not that I think it's a good idea to use aliases to mess with the syntax, or that I could see what use that empty alias could possibly have. The way aliases work is kinda unclean to begin with, so if you want to avoid shooting yourself in the foot with them, then don't use them. For functions, this seems already impossible: $ done() { echo 'hello?'; } bash: syntax error near unexpected token `(' $ \done() { echo 'hello?'; } bash: `\done': not a valid identifier