mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-24 23:23:58 +00:00
Shell: Attach links to completed paths
``` ls ./Ter<tab> ``` gets you a link to ./Terminal.ini, right in the prompt.
This commit is contained in:
parent
88f542dc30
commit
5358608a94
Notes:
sideshowbarker
2024-07-19 06:17:46 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/5358608a947 Pull-request: https://github.com/SerenityOS/serenity/pull/2269
1 changed files with 2 additions and 2 deletions
|
@ -1578,9 +1578,9 @@ Vector<Line::CompletionSuggestion> Shell::complete(const Line::Editor& editor)
|
|||
if (!stat_error) {
|
||||
if (S_ISDIR(program_status.st_mode)) {
|
||||
if (!should_suggest_only_executables)
|
||||
suggestions.append({ escape_token(file), "/" });
|
||||
suggestions.append({ escape_token(file), "/", { Line::Style::Hyperlink(String::format("file://%s", file_path.characters())), Line::Style::Anchored } });
|
||||
} else {
|
||||
suggestions.append({ escape_token(file), " " });
|
||||
suggestions.append({ escape_token(file), " ", { Line::Style::Hyperlink(String::format("file://%s", file_path.characters())), Line::Style::Anchored } });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue