From 5358608a947730b36bee5d4f39fb2127eb585824 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Mon, 18 May 2020 02:27:41 +0430 Subject: [PATCH] Shell: Attach links to completed paths ``` ls ./Ter ``` gets you a link to ./Terminal.ini, right in the prompt. --- Shell/Shell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shell/Shell.cpp b/Shell/Shell.cpp index dbea666557..db8978fc6e 100644 --- a/Shell/Shell.cpp +++ b/Shell/Shell.cpp @@ -1578,9 +1578,9 @@ Vector 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 } }); } } }