mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 19:03:38 +08:00
parent
58df0bc051
commit
baa9b21a6f
|
@ -132,7 +132,6 @@ maybe_t<int> builtin_type(parser_t &parser, io_streams_t &streams, wchar_t **arg
|
|||
++found;
|
||||
res = true;
|
||||
if (!opts.query && !opts.type) {
|
||||
streams.out.append_format(_(L"%ls is a function"), name);
|
||||
auto path = function_get_definition_file(name);
|
||||
if (opts.path) {
|
||||
if (path) {
|
||||
|
@ -140,6 +139,7 @@ maybe_t<int> builtin_type(parser_t &parser, io_streams_t &streams, wchar_t **arg
|
|||
streams.out.append(L"\n");
|
||||
}
|
||||
} else if (!opts.short_output) {
|
||||
streams.out.append_format(_(L"%ls is a function"), name);
|
||||
streams.out.append(_(L" with definition"));
|
||||
streams.out.append(L"\n");
|
||||
// Function path
|
||||
|
@ -166,6 +166,7 @@ maybe_t<int> builtin_type(parser_t &parser, io_streams_t &streams, wchar_t **arg
|
|||
streams.out.append(def);
|
||||
}
|
||||
} else {
|
||||
streams.out.append_format(_(L"%ls is a function"), name);
|
||||
auto path = function_get_definition_file(name);
|
||||
if (path) {
|
||||
streams.out.append_format(_(L" (defined in %ls)"), path);
|
||||
|
|
|
@ -52,3 +52,9 @@ echo $status
|
|||
type -q
|
||||
echo $status
|
||||
# CHECK: 1
|
||||
|
||||
type -p alias
|
||||
# CHECK: {{.*}}/alias.fish
|
||||
|
||||
type -s alias
|
||||
# CHECK: alias is a function (defined in {{.*}}/alias.fish)
|
||||
|
|
Loading…
Reference in New Issue
Block a user