nufmt rewrites --flag=($expr) as --flag ($expr). These two are not equivalent: the = form passes $expr as the flag's value, while the space form for a bool switch sets the flag to true and treats ($expr) as an extra positional argument — which is a parse error.
Input
def do-thing [--check] { $check }
def run [--check] {
let c: bool = $check
do-thing --check=($c)
}
Expected (no change)
def do-thing [--check] { $check }
def run [--check] {
let c: bool = $check
do-thing --check=($c)
}
Actual
def do-thing [--check] { $check }
def run [--check] {
let c = $check
do-thing --check ($c)
}
Environment
Please run rustc --version and paste the result.
rustc 1.93.0 (254b59607 2026-01-19) (built from a source tarball)
nufmt c7eda59