From fc656c03fe44423211102838702b3a382caac7cd Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 14 Mar 2023 06:58:05 -0700 Subject: [PATCH] Apply suggestions from code review --- docs/shell-integration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/shell-integration.md b/docs/shell-integration.md index a509f909f..333f6e87e 100644 --- a/docs/shell-integration.md +++ b/docs/shell-integration.md @@ -130,7 +130,8 @@ function prompt { ### OSC 7 on Windows with powershell (with starship) -When you're using [Starship](https://starship.rs/), the prompt is already modify, in this case can add only the necessary output to the already modified prompt, with a function like this in [powershell profile](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.1): +When using [Starship](https://starship.rs/), since it has taken control of the prompt, hooking in to set +OSC 7 can be achieved this way instead: ```powershell $prompt = "" @@ -141,6 +142,7 @@ function Invoke-Starship-PreCommand { $prompt = "$ansi_escape]7;file://${env:COMPUTERNAME}/${provider_path}$ansi_escape\" } $host.ui.Write($prompt) +} ``` ## Using Clink on Windows Systems