mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-20 16:11:14 -03:00
Variables set in if and while conditions are in the enclosing block, not
the if/while statement block. For example:
if set -l var (somecommand) ; end
echo $var
will now work as expected.
Fixes #4820. Fixes #1212.
25 lines
458 B
Plaintext
25 lines
458 B
Plaintext
|
|
####################
|
|
# Test variable expand
|
|
|
|
####################
|
|
# Test variable set
|
|
|
|
####################
|
|
# Test using slices of command substitution
|
|
|
|
####################
|
|
# Test more
|
|
|
|
####################
|
|
# Verify that if statements swallow failure
|
|
|
|
####################
|
|
# Verify and/or behavior with if and while statements
|
|
|
|
####################
|
|
# Catch this corner case, which should produce an error
|
|
|
|
####################
|
|
# Loop control in conditions
|