diff --git a/share/functions/__fish_whatis_current_token.fish b/share/functions/__fish_whatis_current_token.fish index 7034c791c..a731cf90e 100644 --- a/share/functions/__fish_whatis_current_token.fish +++ b/share/functions/__fish_whatis_current_token.fish @@ -18,7 +18,7 @@ function __fish_whatis_current_token -d "Show man page entries or function descr and set desc "$token - $funcinfo[5]" case builtin - set desc (__fish_print_help $token | awk "/./ {print; exit}") + set desc (__fish_print_help $token | awk "/./ { getline; print; exit }" | string trim) case file set -l tmpdesc (whatis $token 2>/dev/null)