diff --git a/src/complete.cpp b/src/complete.cpp index 380b473ef..65c21ada4 100644 --- a/src/complete.cpp +++ b/src/complete.cpp @@ -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; }