mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibLine: Unify completion hooks and adapt its users
LibLine should ultimately not care about what a "token" means in the context of its user, so force the user to split the buffer itself. This also allows the users to pick up contextual clues as well, since they have to lex the line themselves. This commit pacthes Shell and the JS repl to better handle completions, so certain wrong behaviours are now corrected as well: - JS repl can now complete "Object . getOw<tab>" - Shell can now complete "echo | ca<tab>" and paths inside strings
This commit is contained in:
parent
d18f6e82eb
commit
7fba21aefc
Notes:
sideshowbarker
2024-07-19 06:19:59 +09:00
Author: https://github.com/alimpfard
Commit: 7fba21aefc
Pull-request: https://github.com/SerenityOS/serenity/pull/2294
Reviewed-by: https://github.com/bugaevc
6 changed files with 179 additions and 171 deletions
|
@ -112,8 +112,7 @@ public:
|
|||
static ContinuationRequest is_complete(const Vector<Command>&);
|
||||
|
||||
void highlight(Line::Editor&) const;
|
||||
Vector<Line::CompletionSuggestion> complete_first(const String&);
|
||||
Vector<Line::CompletionSuggestion> complete_other(const String&);
|
||||
Vector<Line::CompletionSuggestion> complete(const Line::Editor&);
|
||||
|
||||
String get_history_path();
|
||||
void load_history();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue