mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 12:41:08 +08:00
builtin functions: don't mix up multiple arguments
This regressed in 2e38cf2a
which is contained in 2.6.0.
Fixes #7515
This commit is contained in:
parent
4ed22246c3
commit
7da93e2617
|
@ -329,7 +329,7 @@ maybe_t<int> builtin_functions(parser_t &parser, io_streams_t &streams, wchar_t
|
|||
} else {
|
||||
if (!opts.query) {
|
||||
if (i != optind) streams.out.append(L"\n");
|
||||
const wchar_t *funcname = argv[optind];
|
||||
const wchar_t *funcname = argv[i];
|
||||
report_function_metadata(funcname, opts.verbose, streams, parser, true);
|
||||
wcstring def = functions_def(funcname);
|
||||
|
||||
|
|
|
@ -73,6 +73,16 @@ functions -d description2 test_func_desc
|
|||
functions test_func_desc | string match --quiet '*description2*'
|
||||
or echo "Failed to find description 2" >&2
|
||||
|
||||
# ==========
|
||||
# Verify that the functions are printed in order.
|
||||
functions f1 test_func_desc
|
||||
# CHECK: # Defined in {{.*}}
|
||||
# CHECK: function f1
|
||||
# CHECK: end
|
||||
# CHECK: # Defined in {{.*}}
|
||||
# CHECK: function test_func_desc --description description2
|
||||
# CHECK: end
|
||||
|
||||
# Note: This test isn't ideal - if ls was loaded before,
|
||||
# or doesn't exist, it'll succeed anyway.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user