Apply suggestions from code review

This commit is contained in:
Wez Furlong committed 2023-03-14 06:58:22 -07:00
1 parent 0e193bf373
commit fc656c03fe
1 file changed
+3 -1
+3 -1
View File
@@ -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