mirror of https://github.com/hashicorp/consul
Merge pull request #3412 from hashicorp/jbs-autocomplete
Autocomplete support via @brianshumatepull/3550/head
commit
3703b05535
2
main.go
2
main.go
|
@ -44,6 +44,8 @@ func realMain() int {
|
||||||
cli := &cli.CLI{
|
cli := &cli.CLI{
|
||||||
Args: args,
|
Args: args,
|
||||||
Commands: command.Commands,
|
Commands: command.Commands,
|
||||||
|
Autocomplete: true,
|
||||||
|
Name: "consul",
|
||||||
HelpFunc: cli.FilteredHelpFunc(cmds, cli.BasicHelpFunc("consul")),
|
HelpFunc: cli.FilteredHelpFunc(cmds, cli.BasicHelpFunc("consul")),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,25 @@ Command Options
|
||||||
Joins a server to another server in the WAN pool.
|
Joins a server to another server in the WAN pool.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Autocompletion
|
||||||
|
|
||||||
|
The `consul` command features opt-in subcommand autocompletion that you can
|
||||||
|
enable for your shell with `consul -autocomplete-install`. After doing so,
|
||||||
|
you can invoke a new shell and use the feature.
|
||||||
|
|
||||||
|
For example, assume a tab is typed at the end of each prompt line:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ consul e
|
||||||
|
event exec
|
||||||
|
|
||||||
|
$ consul r
|
||||||
|
reload rtt
|
||||||
|
|
||||||
|
$ consul operator raft
|
||||||
|
list-peers remove-peer
|
||||||
|
```
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
In addition to CLI flags, Consul reads environment variables for behavior
|
In addition to CLI flags, Consul reads environment variables for behavior
|
||||||
|
|
Loading…
Reference in New Issue