Here's an alias as an example:
alias testbug {
set -l %dat C
if (*a* iswm %dat || ((*bd* !iswm %dat) && *C* iswm %dat)) { echo -s $ifmatch $+ : %dat }
if (*a* iswm %dat || ((*bd* !iswm %dat) && *C* iswm %dat)) echo -s $ifmatch $+ : %dat
}
It returns:
*C*: C
*bd*: C
Somehow, the absence of the { } brackets change the output of $ifmatch
Another thing I encountered was if you use this ifelse comparison:
alias testbug2 {
set -l %dat C
if (*a* !iswm %dat) && ((*b* iswm %dat) || *C* iswm %dat) echo -s $gettok($ifmatch,1,42) $+ : %dat
}
This will return: b: C
However, if you add the {} brackets, it'll evaluate it correctly and $ifmatch will be set to C