forked from toolshed/abra
.gitea
cli
cmd
pkg
scripts
autocomplete
bash
powershell
zsh
installer
tests
.drone.yml
.envrc.sample
.gitignore
.goreleaser.yml
Makefile
README.md
go.mod
go.sum
renovate.json
10 lines
427 B
Plaintext
10 lines
427 B
Plaintext
$fn = $($MyInvocation.MyCommand.Name)
|
|
$name = $fn -replace "(.*)\.ps1$", '$1'
|
|
Register-ArgumentCompleter -Native -CommandName $name -ScriptBlock {
|
|
param($commandName, $wordToComplete, $cursorPosition)
|
|
$other = "$wordToComplete --generate-bash-completion"
|
|
Invoke-Expression $other | ForEach-Object {
|
|
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
|
|
}
|
|
}
|