From 9c58f2a522e84a4888b200f4b994e0102a8a26f6 Mon Sep 17 00:00:00 2001 From: Reilly Wood <26268125+rgwood@users.noreply.github.com> Date: Mon, 29 Aug 2022 07:52:55 -0700 Subject: [PATCH] Disable clickable links in SSH sessions (#6439) * Disable clickable links in WSL and SSH sessions * Revert WSL change; disable links in SSH only --- crates/nu-command/src/viewers/table.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/nu-command/src/viewers/table.rs b/crates/nu-command/src/viewers/table.rs index 0da5dc9929..ff405e6c8b 100644 --- a/crates/nu-command/src/viewers/table.rs +++ b/crates/nu-command/src/viewers/table.rs @@ -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 {