mirror of
https://github.com/sharkdp/bat.git
synced 2026-02-08 00:32:08 +00:00
Merge pull request #3495 from sharkdp/powershell_completions
Update PowerShell completions for compatibility with PowerShell v5.1
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
## Other
|
||||
- Improve README documentation on pager options passed to less, see #3443 (@injust)
|
||||
|
||||
- Make PowerShell completions compatible with PowerShell v5.1, see #3495 (@keith-hall)
|
||||
- Use more robust approach to escaping in Bash completions, see #3448 (@akinomyoga)
|
||||
|
||||
## Syntaxes
|
||||
|
||||
5
assets/completions/_bat.ps1.in
vendored
5
assets/completions/_bat.ps1.in
vendored
@@ -49,7 +49,10 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script
|
||||
}
|
||||
'*;--language' {
|
||||
Get-MyLanguages |
|
||||
ForEach-Object {[CompletionResult]::new(($_.MyParameter -replace "^(.*)$", '''$1'''), $_.MyParameter, [CompletionResultType]::ParameterName, $_.MyDescription ?? '_no value_')}
|
||||
ForEach-Object {
|
||||
$desc = if ($null -eq $_.MyDescription) { '_no value_' } else { $_.MyDescription }
|
||||
[CompletionResult]::new(($_.MyParameter -replace "^(.*)$", '''$1'''), $_.MyParameter, [CompletionResultType]::ParameterName, $desc)
|
||||
}
|
||||
break
|
||||
}
|
||||
'*;--theme' {
|
||||
|
||||
Reference in New Issue
Block a user