diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-03-23 17:57:54 +0430 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-03-26 21:34:56 +0430 |
commit | ef5523231cdacbb314862913b77f2ebea3a663ff (patch) | |
tree | 5a379130e26fc35e5dbd9be04bb1d542cab466db /Userland/Shell/Shell.cpp | |
parent | d995be428a0853323c04cf8431046987992e4f56 (diff) | |
download | serenity-ef5523231cdacbb314862913b77f2ebea3a663ff.zip |
Shell+LibCore: Provide argument help strings as display trivia
Diffstat (limited to 'Userland/Shell/Shell.cpp')
-rw-r--r-- | Userland/Shell/Shell.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index ca101652c2..6fb09d88aa 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -1842,7 +1842,11 @@ ErrorOr<Vector<Line::CompletionSuggestion>> Shell::complete_via_program_itself(s auto parsed = parsed_result.release_value(); if (parsed.is_object()) { auto& object = parsed.as_object(); - Line::CompletionSuggestion suggestion { object.get("completion").to_string() }; + Line::CompletionSuggestion suggestion { + object.get("completion").as_string_or(""), + object.get("trailing_trivia").as_string_or(""), + object.get("display_trivia").as_string_or(""), + }; suggestion.static_offset = object.get("static_offset").to_u64(0); suggestion.invariant_offset = object.get("invariant_offset").to_u64(0); suggestions.append(move(suggestion)); |