Skip to content

Commit 7ae51a1

Browse files
committed
Wrap osc8 to make the url clickable in terminal
1 parent 33bf3a7 commit 7ae51a1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

oauth/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl OAuthClient {
250250
if self.should_open_url {
251251
open::that_in_background(auth_url.as_str());
252252
}
253-
println!("Browse to: {auth_url}");
253+
println!("Browse to: \x1b]8;;{auth_url}\x1b\\{auth_url}\x1b]8;;",);
254254

255255
pkce_verifier
256256
}
@@ -467,7 +467,7 @@ pub fn get_access_token(
467467
.set_pkce_challenge(pkce_challenge)
468468
.url();
469469

470-
println!("Browse to: {auth_url}");
470+
println!("Browse to: \x1b]8;;{auth_url}\x1b\\{auth_url}\x1b]8;;",);
471471

472472
let code = match get_socket_address(redirect_uri) {
473473
Some(addr) => get_authcode_listener(addr, String::from("Go back to your terminal :)")),

0 commit comments

Comments
 (0)