mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:32:27 +08:00
complete: Stop using the function definition as the description
This isn't helpful, and entirely unreadable. Excerpt: ``` __fish_git_prompt_set_char (set -l user_variable_name "$argv[1]" set -l char $argv[2] if set -q argv[3] and begin set -q __fish_git_prompt_show_informative_status or set -q __fi…) ``` Fixes #7911.
This commit is contained in:
parent
4239ba133d
commit
e2146a0eee
|
@ -713,14 +713,7 @@ void completer_t::complete_cmd_desc(const wcstring &str) {
|
|||
/// Returns a description for the specified function, or an empty string if none.
|
||||
static wcstring complete_function_desc(const wcstring &fn) {
|
||||
wcstring result;
|
||||
bool has_description = function_get_desc(fn, result);
|
||||
if (!has_description) {
|
||||
function_get_definition(fn, result);
|
||||
// A completion description is a single line.
|
||||
for (wchar_t &c : result) {
|
||||
if (c == L'\n') c = L' ';
|
||||
}
|
||||
}
|
||||
function_get_desc(fn, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user