Avoid duplicate flag values

Both `SKIP_CMDSUBST` and `NO_SPACE_FOR_UNCLOSED_BRACE` used `1 << 14` as their
value accidentally, resulting from `SKIP_CMDSUBST` not being sorted correctly.
Resolve this by using the next (and last in u16) unused bit for `SKIP_CMDSUBST`
and moving it to the end.

Fixes #11651.
This commit is contained in:
Daniel Rainer
2025-07-10 18:49:23 +02:00
parent 4d67ca7c58
commit a3d03fc0fb

View File

@@ -38,8 +38,6 @@
pub struct ExpandFlags : u16 {
/// Fail expansion if there is a command substitution.
const FAIL_ON_CMDSUBST = 1 << 0;
/// Skip command substitutions.
const SKIP_CMDSUBST = 1 << 14;
/// Skip variable expansion.
const SKIP_VARIABLES = 1 << 1;
/// Skip wildcard expansion.
@@ -75,6 +73,8 @@ pub struct ExpandFlags : u16 {
const SPECIAL_FOR_COMMAND = 1 << 13;
/// The token has an unclosed brace, so don't add a space.
const NO_SPACE_FOR_UNCLOSED_BRACE = 1 << 14;
/// Skip command substitutions.
const SKIP_CMDSUBST = 1 << 15;
}
}