emersion / mrsh

A minimal POSIX shell
MIT License
489 stars 35 forks source link

The display of "unbound variable" cannot be prevented #162

Open ko1nksm opened 4 years ago

ko1nksm commented 4 years ago
$ mrsh -c '(set -u; : $v) 2>/dev/null; echo end'
mrsh: v: unbound variable
end

$ mrsh -c 'foo(){ ( { (set -u; : $v); } ) }; foo 2>/dev/null; echo end'
foo: v: unbound variable
end