diff --git a/nushell/config.nu b/nushell/config.nu index 1f9146d..aeb478e 100644 --- a/nushell/config.nu +++ b/nushell/config.nu @@ -1,6 +1,17 @@ # Disable welcome message per https://www.nushell.sh/book/configuration.html#remove-welcome-message $env.config.show_banner = false +# Configure window title with SSH hostname prefix +$env.config.hooks.pre_prompt = [{ + let title_prefix = if "SSH_CONNECTION" in $env { + $"[(sys host | get hostname)] " + } else { + "" + } + + print -n $"(ansi title)($title_prefix)(pwd | str replace $env.HOME "~")(ansi st)" +}] + # Set theme source ($nu.default-config-dir | path join "themes/catppuccin/themes/catppuccin_mocha.nu")