Update operators.md
logical not - higher precedence than and/xor/or, comparison.
Either I'm not following what this PR is supposed to do, or it's just not right. If you do help operators | sort-by precedence -r the order is correct in our current documentation.
Take the expression "not true and false"
If "not" has lower precedence than "and" then it is equivalent to
not (true and false) = not false = true
if "not" has higher precedence than and, then it it is equivalent to
(not true) and false = false and false = false
The shell - like most other languages - implements the latter case. So the documentation is wrong. "not" has the highest precedence of all the boolean operators.
ok, but then our help operators command and code that generates it must be wrong too. I'm not sure if 0 was hard coded for not or if it is system generated. I haven't looked.
Related issue already on https://github.com/nushell/nushell/issues/13675
I thought this issue sounded familiar.
For some reason I thought this has been merged already - I checked last week and must have missed it still being open.
@jesper-olsen The operator precedence has changed slightly in 0.103, and it looks like your update needs an update. Can you move "Logical not" directly above "Logical and"?