Skip to content

PSCompletions and argc-completions

TIP

  1. Add abyss with Github or Gitee repository.

    pwsh
    scoop bucket add abyss https://github.com/abgox/abyss.git
    pwsh
    scoop bucket add abyss https://gitee.com/abgox/abyss.git
  2. Install Argc-completions.

    pwsh
    scoop install abyss/Argc-completions
  3. Add the following code into $Profile.

powershell
# argc-completions
# To add completions for only the specified command, modify next line e.g. $argc_scripts = @("cargo", "git")
$argc_scripts = $env:ARGC_COMPLETIONS_PATH -split [System.IO.Path]::PathSeparator | Get-ChildItem -File | ForEach-Object { $_.BaseName }
argc --argc-completions powershell $argc_scripts | Out-String | Invoke-Expression
$PSCompletions.argc_completions($argc_scripts) 
  • $PSCompletions.argc_completions accepts an array of commands.
    • e.g. @("cargo", "git")