Make URL clickable in --help

pull/894/head
Wilfred Hughes 2025-10-06 23:23:29 +07:00
parent 81c88ba1d6
commit dc37b874ac
1 changed files with 6 additions and 1 deletions

@ -128,7 +128,12 @@ fn app() -> clap::Command {
.to_string(),
);
after_help.push_str("\n\nSee the full manual at: https://difftastic.wilfred.me.uk/");
// Make the link to the manual clickable in termainals that
// support OSC 8, the ANSI escape code for hyperlinks.
//
// https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
// https://github.com/Alhadis/OSC8-Adoption
after_help.push_str("\n\nSee the full manual at \x1b]8;;https://difftastic.wilfred.me.uk/\x1b\\https://difftastic.wilfred.me.uk/\x1b]8;;\x1b\\.");
Command::new("Difftastic")
.override_usage(USAGE)