https://github.com/posener/complete
bash-completion completion fish-completion go golang shell zsh-completion
Last synced: about 1 month ago
Repository metadata:
bash completion written in go + bash completion for go command
- Host: GitHub
- URL: https://github.com/posener/complete
- Owner: posener
- License: mit
- Created: 2017-05-05T21:34:07.000Z (over 7 years ago)
- Default Branch: v1
- Last Pushed: 2023-07-19T18:29:38.000Z (over 1 year ago)
- Last Synced: 2024-10-29T15:12:52.240Z (about 2 months ago)
- Topics: bash-completion, completion, fish-completion, go, golang, shell, zsh-completion
- Language: Go
- Homepage:
- Size: 230 KB
- Stars: 929
- Watchers: 14
- Forks: 72
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Owner metadata:
- Name: Eyal Posener
- Login: posener
- Email:
- Kind: user
- Description: Sittin' on the dock of the bay
- Website: https://posener.github.io/about
- Location: San Francisco
- Twitter: posenerx
- Company: @google
- Icon url: https://avatars.githubusercontent.com/u/919294?u=b39119bcc62b0339adb79fac73c100d79f1fa71e&v=4
- Repositories: 74
- Last Synced at: 2024-04-16T00:07:56.776Z
- Profile URL: https://github.com/posener
- Sponsor URL:
Committers metadata
Last synced: about 2 months ago
Total Commits: 137
Total Committers: 18
Avg Commits per committer: 7.611
Development Distribution Score (DDS): 0.255
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Eyal Posener | p****r@g****m | 102 |
Adam S Levy | a****m@a****m | 6 |
Alex Dadgar | a****r@g****m | 5 |
Craig Hesling | c****g@h****m | 4 |
Anis Elleuch | a****s@m****o | 3 |
Eyal Posener | e****l@s****m | 3 |
Josh Bleecher Snyder | j****n@g****m | 3 |
goreadme[bot] | g****] | 1 |
santosh653 | 7****3 | 1 |
Adam S Levy | t****y@g****m | 1 |
Costas Tyfoxylos | c****s@s****m | 1 |
Deleplace | d****5@g****m | 1 |
George Christou | g****r@g****m | 1 |
Ivan Daniluk | i****k@g****m | 1 |
Seth Vargo | s****h@s****m | 1 |
Thom Shutt | g****b@t****m | 1 |
Yuki Ito | a****u@g****m | 1 |
lucapette | l****e@g****m | 1 |
Issue and Pull Request metadata
Last synced: about 1 month ago
Package metadata
- Total packages: 3
- Total downloads: unknown
- Total docker downloads: 3,513,357,025
- Total dependent packages: 6,456 (may contain duplicates)
- Total dependent repositories: 73,355 (may contain duplicates)
- Total versions: 26
go: 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 .
- Homepage: https://github.com/posener/complete
- Documentation: https://pkg.go.dev/github.com/posener/complete#section-documentation
- Licenses: MIT
- Latest release: v1.2.3 (published about 5 years ago)
- Last Synced: 2024-11-11T01:37:45.373Z (about 1 month ago)
- Versions: 6
- Dependent Packages: 6,382
- Dependent Repositories: 73,252
- Docker Downloads: 3,417,969,456
-
Rankings:
- Dependent repos count: 0.016%
- Dependent packages count: 0.031%
- Docker downloads count: 0.077%
- Average: 1.068%
- Stargazers count: 2.137%
- Forks count: 3.077%
go: github.com/posener/complete/v2
Package complete is everything for bash completion and Go. Writing bash completion scripts is a hard work, usually done in the bash scripting language. This package provides: * A library for bash completion for Go programs. * A tool for writing bash completion script in the Go language. For any Go or non Go program. * Bash completion for the `go` command line (See ./gocomplete). * Library for bash-completion enabled flags (See ./compflag). * Enables an easy way to install/uninstall the completion of the command. The library and tools are extensible such that any program can add its one logic, completion types or methologies. ./gocomplete is the script 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. Install: 1. Type in your shell: 2. Restart your shell Uninstall by `COMP_UNINSTALL=1 gocomplete` Features: - Complete `go` command, including sub commands and flags. - Complete packages names or `.go` files when necessary. - Complete test names after `-run` flag. Supported shells: - [x] bash - [x] zsh - [x] fish The installation of completion for a command line tool is done automatically by this library by running the command line tool with the `COMP_INSTALL` environment variable set. Uninstalling the completion is similarly done by the `COMP_UNINSTALL` environment variable. For example, if a tool called `my-cli` uses this library, the completion can install by running `COMP_INSTALL=1 my-cli`. Add bash completion capabilities to any Go program. See ./example/command. This package also enables to complete flags defined by the standard library `flag` package. To use this feature, simply call `complete.CommandLine` before `flag.Parse`. (See ./example/stdlib). If flag value completion is desired, it can be done by providing the standard library `flag.Var` function a `flag.Value` that also implements the `complete.Predictor` interface. For standard flag with values, it is possible to use the `github.com/posener/complete/v2/compflag` package. (See ./example/compflag). Instead of calling both `complete.CommandLine` and `flag.Parse`, one can call just `compflag.Parse` which does them both. For command line bash completion testing use the `complete.Test` function.
- Homepage: https://github.com/posener/complete
- Documentation: https://pkg.go.dev/github.com/posener/complete/v2#section-documentation
- Licenses: MIT
- Latest release: v2.1.0 (published over 1 year ago)
- Last Synced: 2024-11-11T01:37:44.775Z (about 1 month ago)
- Versions: 17
- Dependent Packages: 74
- Dependent Repositories: 103
- Docker Downloads: 95,387,569
-
Rankings:
- Docker downloads count: 0.265%
- Dependent packages count: 0.562%
- Dependent repos count: 0.597%
- Average: 1.3%
- Stargazers count: 2.084%
- Forks count: 2.995%
go: github.com/posener/complete/gocomplete
Package main is complete tool for the go command line
- Homepage: https://github.com/posener/complete
- Documentation: https://pkg.go.dev/github.com/posener/complete/gocomplete#section-documentation
- Licenses: MIT
- Latest release: v1.2.3 (published about 2 years ago)
- Last Synced: 2024-11-10T01:10:34.905Z (about 1 month ago)
- Versions: 3
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 1.313%
- Forks count: 1.865%
- Average: 4.881%
- Dependent packages count: 6.999%
- Dependent repos count: 9.346%
Dependencies
- github.com/hashicorp/go-multierror v1.0.0
- github.com/stretchr/testify v1.4.0
- github.com/davecgh/go-spew v1.1.0
- github.com/hashicorp/errwrap v1.0.0
- github.com/hashicorp/go-multierror v1.0.0
- github.com/pmezard/go-difflib v1.0.0
- github.com/stretchr/objx v0.1.0
- github.com/stretchr/testify v1.4.0
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
- gopkg.in/yaml.v2 v2.2.2