pscompletions.text 578 B

123456789101112131415
  1. # PowerShell parameter completion shim for xmake
  2. Register-ArgumentCompleter -Native -CommandName xmake -ScriptBlock {
  3. param($commandName, $wordToComplete, $cursorPosition)
  4. $complete = "$wordToComplete"
  5. if (-not $commandName) {
  6. $complete = $complete + " "
  7. }
  8. $oldenv = $env:XMAKE_SKIP_HISTORY
  9. $env:XMAKE_SKIP_HISTORY = 1
  10. xmake lua --root private.utils.complete "0" "nospace" "$complete" | ForEach-Object {
  11. [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
  12. }
  13. $env:XMAKE_SKIP_HISTORY = $oldenv
  14. }