From 55240d98a53d8554c19ac0265fe3f65038e4b637 Mon Sep 17 00:00:00 2001 From: Piepmatz Date: Mon, 16 Jun 2025 21:42:07 +0200 Subject: [PATCH] Update `config nu --doc` to represent OSC 7 and 9;9 better (#15979) - fixes #15975 # Description This changes the `config nu --doc` output for OSC 7 and 9;9 to represent better what happens on Windows machines. This is the current behavior internally: https://github.com/nushell/nushell/blob/5be8717fe80296e4dcec705a8aa362c46ec473f0/crates/nu-protocol/src/config/shell_integration.rs#L18-L27 And with this PR the `config nu --doc` better reflects that behavior, thanks to @fdncred for that idea. # User-Facing Changes None # Tests + Formatting - :green_circle: `toolkit fmt` - :green_circle: `toolkit clippy` - :green_circle: `toolkit test` - :green_circle: `toolkit test stdlib` # After Submitting --------- Co-authored-by: Bahex --- crates/nu-utils/src/default_files/doc_config.nu | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/nu-utils/src/default_files/doc_config.nu b/crates/nu-utils/src/default_files/doc_config.nu index 31a57a645b..252eb4718e 100644 --- a/crates/nu-utils/src/default_files/doc_config.nu +++ b/crates/nu-utils/src/default_files/doc_config.nu @@ -202,14 +202,12 @@ $env.config.shell_integration.osc2 = true # osc7 (bool): # Nushell will report the current directory to the terminal using OSC 7. This is useful when # spawning new tabs in the same directory. -# This is disabled by default on Windows in favor of the `osc9_9` option. -$env.config.shell_integration.osc7 = true +$env.config.shell_integration.osc7 = ($nu.os-info.name != windows) # osc9_9 (bool): # Enables/Disables OSC 9;9 support, originally a ConEmu terminal feature. This is an # alternative to OSC 7 which also communicates the current path to the terminal. -# This is enabled by default on Windows as it is used by the Windows Terminal. -$env.config.shell_integration.osc9_9 = false +$env.config.shell_integration.osc9_9 = ($nu.os-info.name == windows) # osc8 (bool): # When true, the `ls` command will generate clickable links that can be launched in another