On Fri, May 12, 2017 at 08:11:35AM -0500, Eduardo Bustamante wrote:
> On Fri, May 12, 2017 at 7:33 AM, Gabor Burjan <b...@buvoshetes.hu> wrote:
> [...]
> > Description:
> >         unalias works weirdly inside an if-then block
> 
> It's not just an if-then block. It's any kind of block:
> [...]
> 
> (the key part here is that aliases are expanded when a command is
> read, not when it's executed. Bash needs to parse the whole block, at
> which point the alias is expanded. The unalias is not executed but
> until after).

In this case it's not a bug, but the documented behaviour.
Thanks for the explanation.

BR,
Gabor

Reply via email to