mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
c7f16439bf
! and not are effectively interchangeable now. Mark them both as operators for syntax highlighting.
40 lines
408 B
Text
40 lines
408 B
Text
|
|
####################
|
|
# Basic && and || support
|
|
first
|
|
second
|
|
third
|
|
true && false: 1
|
|
true || false: 0
|
|
true && false || true: 0
|
|
|
|
####################
|
|
# && and || in if statements
|
|
if test 1 ok
|
|
if test 2 ok
|
|
if test 3 ok
|
|
if test 4 ok
|
|
|
|
####################
|
|
# && and || in while statements
|
|
0 0 0
|
|
1 1 1
|
|
2 2 2
|
|
3 3 3
|
|
4 4 4
|
|
|
|
####################
|
|
# Nots
|
|
0
|
|
1
|
|
1
|
|
0
|
|
not !
|
|
0
|
|
|
|
####################
|
|
# Complex scenarios
|
|
1
|
|
2
|
|
3
|
|
4
|