mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 20:16:12 +08:00
c7f16439bf
! and not are effectively interchangeable now. Mark them both as operators for syntax highlighting.
41 lines
408 B
Plaintext
41 lines
408 B
Plaintext
|
|
####################
|
|
# 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
|