mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(pwsh): disable tooltips for ConstrainedLanguage
mode
This commit is contained in:
parent
7ebfc530fe
commit
348cacc860
|
@ -101,7 +101,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("::TOOLTIPS::" -eq "true") {
|
if (("::TOOLTIPS::" -eq "true") -and ($ExecutionContext.SessionState.LanguageMode -ne "ConstrainedLanguage")) {
|
||||||
Set-PSReadLineKeyHandler -Key Spacebar -BriefDescription 'OhMyPoshSpaceKeyHandler' -ScriptBlock {
|
Set-PSReadLineKeyHandler -Key Spacebar -BriefDescription 'OhMyPoshSpaceKeyHandler' -ScriptBlock {
|
||||||
[Microsoft.PowerShell.PSConsoleReadLine]::Insert(' ')
|
[Microsoft.PowerShell.PSConsoleReadLine]::Insert(' ')
|
||||||
$position = $host.UI.RawUI.CursorPosition
|
$position = $host.UI.RawUI.CursorPosition
|
||||||
|
@ -112,7 +112,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
|
||||||
Write-Host $standardOut -NoNewline
|
Write-Host $standardOut -NoNewline
|
||||||
$host.UI.RawUI.CursorPosition = $position
|
$host.UI.RawUI.CursorPosition = $position
|
||||||
# we need this workaround to prevent the text after cursor from disappearing when the tooltip is rendered
|
# we need this workaround to prevent the text after cursor from disappearing when the tooltip is rendered
|
||||||
[Microsoft.PowerShell.PSConsoleReadLine]::Insert(" ")
|
[Microsoft.PowerShell.PSConsoleReadLine]::Insert(' ')
|
||||||
[Microsoft.PowerShell.PSConsoleReadLine]::Undo()
|
[Microsoft.PowerShell.PSConsoleReadLine]::Undo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@ import Tabs from "@theme/Tabs";
|
||||||
import TabItem from "@theme/TabItem";
|
import TabItem from "@theme/TabItem";
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
Due to limitations (or not having found a way just yet), this feature only works in `fish`, `zsh`, `powershell` and `cmd` (as of [Clink][clink] v1.2.46+) for
|
Due to limitations (or not having found a way just yet), this feature only works in `fish`, `zsh`, `powershell`
|
||||||
the time being.
|
(`ConstrainedLanguage` mode unsupported) and `cmd` (as of [Clink][clink] v1.2.46+) for the time being.
|
||||||
:::
|
:::
|
||||||
|
|
||||||

|

|
||||||
|
|
|
@ -8,7 +8,7 @@ import Tabs from "@theme/Tabs";
|
||||||
import TabItem from "@theme/TabItem";
|
import TabItem from "@theme/TabItem";
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
This feature only works in `fish`, `zsh`, `powershell` and `cmd` for the time being.
|
This feature only works in `fish`, `zsh`, `powershell` (`ConstrainedLanguage` mode unsupported) and `cmd` for the time being.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Transient prompt, when enabled, replaces the prompt with a simpler one to allow more screen real estate.
|
Transient prompt, when enabled, replaces the prompt with a simpler one to allow more screen real estate.
|
||||||
|
|
|
@ -195,7 +195,7 @@ SAVEHIST=10000
|
||||||
setopt appendhistory
|
setopt appendhistory
|
||||||
```
|
```
|
||||||
|
|
||||||
### Fish: $( ... ) is not supported
|
### Fish: $(...) is not supported
|
||||||
|
|
||||||
You should update fish to v3.4.0 or higher. Fish supports `$(...)` and `"$(...)"` since v3.4.0, as described in its [changelog][fish-changelog].
|
You should update fish to v3.4.0 or higher. Fish supports `$(...)` and `"$(...)"` since v3.4.0, as described in its [changelog][fish-changelog].
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue