mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibLine: Autocomplete single suggestions
`cd /h<tab>` -> `cd /home/`, pressing tab after that would descend into `/home/' and show `/home/anon/`
This commit is contained in:
parent
d3e735f279
commit
fa0525b8bf
1 changed files with 9 additions and 1 deletions
|
@ -382,7 +382,15 @@ String Editor::get_line(const String& prompt)
|
||||||
}
|
}
|
||||||
reposition_cursor();
|
reposition_cursor();
|
||||||
}
|
}
|
||||||
|
if (m_suggestions.size() < 2) {
|
||||||
|
// we have none, or just one suggestion
|
||||||
|
// we should just commit that and continue
|
||||||
|
// after it, as if it were auto-completed
|
||||||
|
suggest(0, 0);
|
||||||
|
m_last_shown_suggestion = String::empty();
|
||||||
|
m_suggestions.clear();
|
||||||
|
m_times_tab_pressed = 0;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue