Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sigoden/argc-completions
{bash,zsh,fish,powershell,nushell}-completions for 1000+ commands.
https://github.com/sigoden/argc-completions
bash bash-completions completion cross-shell fish fish-completion nushell nushell-completions powershell powershell-completions shell shell-completion zsh zsh-completions
Last synced: 2 days ago
JSON representation
{bash,zsh,fish,powershell,nushell}-completions for 1000+ commands.
- Host: GitHub
- URL: https://github.com/sigoden/argc-completions
- Owner: sigoden
- License: mit
- Created: 2023-03-15T05:10:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T23:07:16.000Z (2 months ago)
- Last Synced: 2024-10-30T01:47:43.333Z (2 months ago)
- Topics: bash, bash-completions, completion, cross-shell, fish, fish-completion, nushell, nushell-completions, powershell, powershell-completions, shell, shell-completion, zsh, zsh-completions
- Language: Shell
- Homepage:
- Size: 4.05 MB
- Stars: 237
- Watchers: 4
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Argc-completions
{bash,zsh,fish,powershell,nushell}-completions for 1000+ commands.
![argc-completions](https://github.com/sigoden/argc-completions/assets/4012553/235bd290-516c-4dec-83d8-17cb852d35ae)
## Features
- Autocomplete for 1000+ commands ([full list](./MANIFEST.md)).
- Automatically generate completion scripts from the help text or man pages.
- Dynamic completion leads to fewer scripts loading and faster terminal startup.
- Easily upgrade completion scripts as command are upgraded.
- Cross shells: bash/zsh/powershell/fish/nushell/elvish/xonsh/tcsh.
- Cross platforms: linux, macOS, and Windows.#### Amazing features that native completion lacks or is difficult to implement
Feature
Showcase
Parallel Computing
_choice_ref() {
_argc_util_parallel _choice_branch ::: _choice_tag ::: _choice_head
}
Fetch remote data
Complete multiple values
(comma-seperated)
Complete multiple parts
Complete key-value pairs
Complete for plugins
(git,cargo ...)
Delegate to another command
(sudo,doas,npx...)
Style & color
## Getting Started
```sh
git clone https://github.com/sigoden/argc-completions.git
cd argc-completions
./scripts/download-tools.sh
./scripts/setup-shell.sh bash # bash/zsh/powershell/fish/nushell/elvish/xonsh/tcsh
```> For Windows, please run the above code in Git Bash.
> For macOS, `brew install bash gawk gnu-sed` to avoid compatibility issues.Tools downloaded by `./scripts/download-tools.sh`:
- [argc](https://github.com/sigoden/argc): completion engine
- [yq](https://github.com/mikefarah/yq): YAML/JSON/XML/CSV/TOML processor### Uninstall easily
1. Delete the `argc-completions` directory that you have downloaded.
2. Undo the changes made to the shell rcfile (`~/.bashrc`, `~/.zshrc`, ...).## Generate your own completion script
```sh
./scripts/generate.sh your-command
```![generate](https://github.com/sigoden/argc-completions/assets/4012553/1bd7c6af-8dbb-4c83-9c40-d75fc8702bbc)
To learn how `generate` works, see [docs/generate.md](docs/generate.md)
To learn various complete patterns, see [docs/complete-patterns.md](docs/complete-patterns.md)
## License
Argc-completions is made available under the terms of the MIT License.
See the LICENSE file for license details.