Update readme.md
This commit is contained in:
parent
758253551e
commit
fc04737363
15
readme.md
15
readme.md
|
@ -40,8 +40,8 @@ Uninstall by `gocomplete -uninstall`
|
||||||
|
|
||||||
Supported shells:
|
Supported shells:
|
||||||
|
|
||||||
[x] bash
|
- [x] bash
|
||||||
[x] zsh
|
- [x] zsh
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
@ -75,9 +75,10 @@ func main() {
|
||||||
|
|
||||||
// define flags of the build sub command
|
// define flags of the build sub command
|
||||||
Flags: complete.Flags{
|
Flags: complete.Flags{
|
||||||
// build sub command has a flag '-fast', which
|
// build sub command has a flag '-cpus', which
|
||||||
// does not expects anything after it.
|
// expects number of cpus after it. in that case
|
||||||
"-fast": complete.PredictNothing,
|
// anything could complete this flag.
|
||||||
|
"-cpus": complete.Anything,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -105,4 +106,6 @@ func main() {
|
||||||
### Self completing program
|
### Self completing program
|
||||||
|
|
||||||
In case that the program that we want to complete is written in go we
|
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)
|
can make it self completing.
|
||||||
|
|
||||||
|
Here is an [example](./example/self/main.go)
|
||||||
|
|
Loading…
Reference in New Issue