PSCompletions and argc-completions
TIP
- argc-completions is a command-completion library for 1000+ commands.
- PSCompletions can work with argc-completions by following these steps.
WARNING
- Some completions may be garbled due to encoding errors.
- You may need to set the output encoding to
UTF-8.
powershell
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = [System.Text.UTF8Encoding]::new()Use Scoop
Add the abyss bucket via Github or Gitee.
shscoop bucket add abyss https://github.com/abgox/abyssshscoop bucket add abyss https://gitee.com/abgox/abyssInstall it.
shellscoop install abyss/sigoden.Argc-completionsAdd the following content into
$Profile.
powershell
# argc-completions
Set-Alias ch chezmoi # Set alias for chezmoi
$argc_scripts = @("gh", "chezmoi")
argc --argc-completions powershell $argc_scripts | Out-String | Invoke-Expression
$PSCompletions.argc_completions($argc_scripts) Don't use Scoop
- You need a quick start to argc-completions.
Please refer to the latest argc-completions repo.
bash
git clone https://github.com/sigoden/argc-completions.git
cd argc-completions
./scripts/download-tools.sh
./scripts/setup-shell.sh powershell- Add the following content into
$Profile.
powershell
# argc-completions
Set-Alias ch chezmoi # Set alias for chezmoi
$env:ARGC_COMPLETIONS_ROOT = 'D:\argc-completions'
$env:PATH = $env:ARGC_COMPLETIONS_ROOT + '\bin' + [IO.Path]::PathSeparator + $env:PATH
$argc_scripts = @("gh", "chezmoi")
argc --argc-completions powershell $argc_scripts | Out-String | Invoke-Expression
$PSCompletions.argc_completions($argc_scripts)