Upon further testing, it seems a similar sort of behavior occurs when the
. prefix is used to "silence" the "construct command", except that it, of course, simply runs the first alias in quiet mode, (i.e. with
$show == $false), if it occurs on the same logical line. Unlike the
! prefix buggy behavior, however, this will occur
even if the alias is used as an identifier - given:
alias -l quiet_alias {
echo -ga silenceable alias invoked as $iif( $isid , an identifier , a command ) with $!show == $show
echo -gaq this message is only visible in verbose mode
}
alias pfxtest_5 {
.if ( $true ) {
quiet_alias
}
.if ( $true ) {
$quiet_alias
}
}
alias pfxtest_6 {
.if ( $true ) { quiet_alias }
.if ( $true ) { $quiet_alias }
}...
/pfxtest_5 will print both messages within
/quiet_alias in both cases, while
/pfxtest_6 will only print the first (non-silenceable) message in both cases.