An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/posener/complete

Package complete provides a tool for bash writing bash completion in go, and bash completion for the go command line. Writing bash completion scripts is a hard work. This package provides an easy way to create bash completion scripts for any command, and also an easy way to install/uninstall the completion of the command. In ./cmd/gocomplete there is an example for bash completion for the `go` command line. This is an example that uses the `complete` package on the `go` command - the `complete` package can also be used to implement any completions, see #usage. 1. Type in your shell: 2. Restart your shell Uninstall by `gocomplete -uninstall` - Complete `go` command, including sub commands and all flags. - Complete packages names or `.go` files when necessary. - Complete test names after `-run` flag. Supported shells: - [x] bash - [x] zsh - [x] fish Assuming you have program called `run` and you want to have bash completion for it, meaning, if you type `run` then space, then press the `Tab` key, the shell will suggest relevant complete options. In that case, we will create a program called `runcomplete`, a go program, with a `func main()` and so, that will make the completion of the `run` program. Once the `runcomplete` will be in a binary form, we could `runcomplete -install` and that will add to our shell all the bash completion options for `run`. So here it is: In case that the program that we want to complete is written in go we can make it self completing. Here is an example: ./example/self/main.go .

Ecosystem
proxy.golang.org
Latest Release
v1.2.3
over 6 years ago
Versions
6
Dependent Packages
6,382
Dependent Repos
73,252
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/posener/complete
spec
License MIT
Namespace github.com/posener
First Release about 8 years ago
Last Synced about 10 hours ago
Repository
Stars 939 on GitHub
Forks 73 on GitHub
Docker Dependents 2,498
Docker Downloads 3,417,969,456
Commits 137
Committers 18
Avg per Author 7.611
DDS 0.255
Rankings on proxy.golang.org
Overall Top 1.1%
Dependent packages Top 0.1%
Dependent repos Top 0.1%
Forks Top 3.1%
Docker downloads Top 0.1%