mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Shell: Initial support for 'option' completions
Take one small step towards #2357. Handle completing barewords starting with '-' by piping the requests to the Shell::complete_option(program_name, option) :^) Also implements completion for a single builtin (setopt) until we figure out how to handle #2357.
This commit is contained in:
committed by
Andreas Kling
parent
b8d1edb2a2
commit
ff857cd358
@@ -75,6 +75,7 @@ public:
|
||||
RefPtr<Job> run_command(AST::Command&);
|
||||
bool run_file(const String&);
|
||||
bool run_builtin(int argc, const char** argv, int& retval);
|
||||
bool has_builtin(const StringView&) const;
|
||||
void block_on_job(RefPtr<Job>);
|
||||
String prompt() const;
|
||||
|
||||
@@ -101,6 +102,7 @@ public:
|
||||
Vector<Line::CompletionSuggestion> complete_program_name(const String&, size_t offset);
|
||||
Vector<Line::CompletionSuggestion> complete_variable(const String&, size_t offset);
|
||||
Vector<Line::CompletionSuggestion> complete_user(const String&, size_t offset);
|
||||
Vector<Line::CompletionSuggestion> complete_option(const String&, const String&, size_t offset);
|
||||
|
||||
void take_back_stdin();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user