diff options
| author | xq114 <[email protected]> | 2023-03-03 15:36:40 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2023-03-03 15:36:40 +0800 |
| commit | 0a572a391ef0519577474c8b9c22b8dcf8c2441b (patch) | |
| tree | 1240f8f137a1ba98a30132b8e52692048355c73f /scripts | |
| parent | e9db1bd878d77911ce59fd67b1a7393afbee8f0a (diff) | |
delete register-completions.ps1
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/register-completions.ps1 | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/scripts/register-completions.ps1 b/scripts/register-completions.ps1 deleted file mode 100755 index 201f291cd..000000000 --- a/scripts/register-completions.ps1 +++ /dev/null @@ -1,43 +0,0 @@ -# PowerShell parameter completion for xmake -Register-ArgumentCompleter -Native -CommandName xmake -ScriptBlock { - param($commandName, $wordToComplete, $cursorPosition) - $complete = "$wordToComplete" - if (-not $commandName) { - $complete = $complete + " " - } - $oldenv = $env:XMAKE_SKIP_HISTORY - $env:XMAKE_SKIP_HISTORY = 1 - $results = xmake lua "private.utils.complete" $cursorPosition "nospace-json" "$complete" | ConvertFrom-Json | Sort-Object -Property value - $results | ForEach-Object { - $hasdesc = [bool] $_.psobject.Properties['description'] - if ($hasdesc) { - $desc = " - $($_.description)" - } else { - $desc = "" - } - [System.Management.Automation.CompletionResult]::new($_.value, "$($_.value)$desc", 'ParameterValue', $_.value) - } - $env:XMAKE_SKIP_HISTORY = $oldenv -} - -# PowerShell parameter completion for xrepo -Register-ArgumentCompleter -Native -CommandName xrepo -ScriptBlock { - param($commandName, $wordToComplete, $cursorPosition) - $complete = "$wordToComplete" - if (-not $commandName) { - $complete = $complete + " " - } - $oldenv = $env:XMAKE_SKIP_HISTORY - $env:XMAKE_SKIP_HISTORY = 1 - $results = xmake lua "private.xrepo.complete" $cursorPosition "nospace-json" "$complete" | ConvertFrom-Json | Sort-Object -Property value - $results | ForEach-Object { - $hasdesc = [bool] $_.psobject.Properties['description'] - if ($hasdesc) { - $desc = " - $($_.description)" - } else { - $desc = "" - } - [System.Management.Automation.CompletionResult]::new($_.value, "$($_.value)$desc", 'ParameterValue', $_.value) - } - $env:XMAKE_SKIP_HISTORY = $oldenv -}
\ No newline at end of file |
