mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
parent
737c2d156d
commit
77ef2ef6c3
4 changed files with 13 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
- `switch` now allows arguments that expand to nothing, like empty variables (#5677).
|
||||
- The null command (:) now always exits successfully, rather than echoing last return code.
|
||||
- Cursor configuration instructions for vi-mode have been added to the fish documentation.
|
||||
- `jobs --last` returns 0 to indicate success when a job is found (#6104).
|
||||
|
||||
### Syntax changes and new commands
|
||||
- Brace expansion now only takes place if the braces include a "," or a variable expansion, so things like `git reset HEAD@{0}` now work (#5869).
|
||||
|
|
|
@ -174,9 +174,10 @@ int builtin_jobs(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
|||
for (const auto &j : parser.jobs()) {
|
||||
if (j->is_visible()) {
|
||||
builtin_jobs_print(j.get(), mode, !streams.out_is_redirected, streams);
|
||||
return STATUS_CMD_ERROR;
|
||||
return STATUS_CMD_OK;
|
||||
}
|
||||
}
|
||||
return STATUS_CMD_ERROR;
|
||||
|
||||
} else {
|
||||
if (w.woptind < argc) {
|
||||
|
|
|
@ -30,3 +30,9 @@ function sleep_done_$sleep_job --on-job-exit $sleep_job
|
|||
functions --erase sleep_done_$sleep_job
|
||||
end
|
||||
sleep 2
|
||||
|
||||
# Verify `jobs -l` works and returns the right status codes
|
||||
# https://github.com/fish-shell/fish-shell/issues/6104
|
||||
jobs --last --command; echo $status
|
||||
sleep 0.2 &
|
||||
jobs -lc; echo $status
|
||||
|
|
|
@ -9,3 +9,7 @@ sleep
|
|||
Command
|
||||
sleep
|
||||
sleep is done
|
||||
1
|
||||
Command
|
||||
sleep
|
||||
0
|
||||
|
|
Loading…
Reference in a new issue