mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
refactor set builtin
This completes the refactoring of the `set` builtin. It also removes a seemingly never used feature of the `set` command. It also eliminates all the lint warnings about this module. Fixes #4236
This commit is contained in:
@@ -161,10 +161,10 @@ end;
|
||||
|
||||
set -U -e baz
|
||||
|
||||
echo "Verify subcommand statuses"
|
||||
echo "# Verify subcommand statuses"
|
||||
echo (false) $status (true) $status (false) $status
|
||||
|
||||
echo "Verify that set passes through exit status, except when passed -n or -q or -e"
|
||||
echo "# Verify that set passes through exit status, except when passed -n or -q or -e"
|
||||
false ; set foo bar ; echo 1 $status # passthrough
|
||||
true ; set foo bar ; echo 2 $status # passthrough
|
||||
false ; set -q foo ; echo 3 $status # no passthrough
|
||||
@@ -178,7 +178,7 @@ false ; set foo (echo A; true) ; echo 10 $status $foo
|
||||
true ; set foo (echo B; false) ; echo 11 $status $foo
|
||||
true
|
||||
|
||||
echo "Verify set -ql behavior" # see 2502
|
||||
echo "# Verify set -ql behavior" # see 2502
|
||||
function setql_check
|
||||
set -l setql_foo val
|
||||
if set -ql setql_foo
|
||||
|
||||
@@ -20,9 +20,9 @@ Test 19 pass
|
||||
Test 20 pass
|
||||
Test 21 pass
|
||||
Test 22 pass
|
||||
Verify subcommand statuses
|
||||
# Verify subcommand statuses
|
||||
1 0 1
|
||||
Verify that set passes through exit status, except when passed -n or -q or -e
|
||||
# Verify that set passes through exit status, except when passed -n or -q or -e
|
||||
1 1
|
||||
2 0
|
||||
3 0
|
||||
@@ -34,5 +34,5 @@ Verify that set passes through exit status, except when passed -n or -q or -e
|
||||
9 121
|
||||
10 0 A
|
||||
11 1 B
|
||||
Verify set -ql behavior
|
||||
# Verify set -ql behavior
|
||||
Pass
|
||||
|
||||
Reference in New Issue
Block a user