mirror of
https://gitea.com/gitea/tea.git
synced 2024-12-04 14:46:40 -05:00
287df8a715
add autocompletion files to contrib/ curl -o contrib/autocomplete.zsh https://raw.githubusercontent.com/urfave/cli/master/autocomplete/zsh_autocomplete curl -o contrib/autocomplete.sh https://raw.githubusercontent.com/urfave/cli/master/autocomplete/bash_autocomplete add powershell add `tea meta autocomplete` closes #86 update docs Co-authored-by: Norwin Roosen <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/309 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: 6543 <6543@obermui.de> Co-Authored-By: Norwin <noerw@noreply.gitea.io> Co-Committed-By: Norwin <noerw@noreply.gitea.io>
9 lines
426 B
PowerShell
9 lines
426 B
PowerShell
$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', $_)
|
|
}
|
|
} |