From ff57d506b7960275de05a4c0214de4ff30436740 Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Mon, 23 Mar 2026 22:10:50 +0800 Subject: [PATCH] Wrap osc8 to make the url clickable in terminal --- oauth/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oauth/src/lib.rs b/oauth/src/lib.rs index 707cc5779..61d59a545 100644 --- a/oauth/src/lib.rs +++ b/oauth/src/lib.rs @@ -250,7 +250,7 @@ impl OAuthClient { if self.should_open_url { open::that_in_background(auth_url.as_str()); } - println!("Browse to: {auth_url}"); + println!("Browse to: \x1b]8;;{auth_url}\x1b\\{auth_url}\x1b]8;;\x1b\\",); pkce_verifier } @@ -467,7 +467,7 @@ pub fn get_access_token( .set_pkce_challenge(pkce_challenge) .url(); - println!("Browse to: {auth_url}"); + println!("Browse to: \x1b]8;;{auth_url}\x1b\\{auth_url}\x1b]8;;\x1b\\",); let code = match get_socket_address(redirect_uri) { Some(addr) => get_authcode_listener(addr, String::from("Go back to your terminal :)")),