Disable clickable links in SSH sessions (#6439)

* Disable clickable links in WSL and SSH sessions

* Revert WSL change; disable links in SSH only
This commit is contained in:
Reilly Wood 2022-08-29 07:52:55 -07:00 committed by GitHub
parent 3cb9147f22
commit 9c58f2a522
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -260,7 +260,10 @@ fn handle_row_stream(
None => None,
};
let ls_colors = get_ls_colors(ls_colors_env_str);
let show_clickable_links = config.show_clickable_links_in_ls;
// clickable links don't work in remote SSH sessions
let in_ssh_session = std::env::var("SSH_CLIENT").is_ok();
let show_clickable_links = config.show_clickable_links_in_ls && !in_ssh_session;
ListStream::from_stream(
stream.map(move |(mut x, _)| match &mut x {