vendor/github.com/spf13/cobra/active_help.md
author Mikael Berthe <mikael@lilotux.net>
Tue, 23 Aug 2022 22:39:43 +0200
changeset 260 445e01aede7e
permissions -rw-r--r--
Update vendor directory
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
260
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     1
# Active Help
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     2
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     3
Active Help is a framework provided by Cobra which allows a program to define messages (hints, warnings, etc) that will be printed during program usage.  It aims to make it easier for your users to learn how to use your program.  If configured by the program, Active Help is printed when the user triggers shell completion.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     4
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     5
For example, 
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     6
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     7
bash-5.1$ helm repo add [tab]
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     8
You must choose a name for the repo you are adding.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     9
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    10
bash-5.1$ bin/helm package [tab]
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    11
Please specify the path to the chart to package
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    12
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    13
bash-5.1$ bin/helm package [tab][tab]
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    14
bin/    internal/    scripts/    pkg/     testdata/
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    15
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    16
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    17
**Hint**: A good place to use Active Help messages is when the normal completion system does not provide any suggestions. In such cases, Active Help nicely supplements the normal shell completions to guide the user in knowing what is expected by the program.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    18
## Supported shells
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    19
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    20
Active Help is currently only supported for the following shells:
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    21
- Bash (using [bash completion V2](shell_completions.md#bash-completion-v2) only). Note that bash 4.4 or higher is required for the prompt to appear when an Active Help message is printed.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    22
- Zsh
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    23
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    24
## Adding Active Help messages
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    25
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    26
As Active Help uses the shell completion system, the implementation of Active Help messages is done by enhancing custom dynamic completions.  If you are not familiar with dynamic completions, please refer to [Shell Completions](shell_completions.md).
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    27
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    28
Adding Active Help is done through the use of the `cobra.AppendActiveHelp(...)` function, where the program repeatedly adds Active Help messages to the list of completions.  Keep reading for details.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    29
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    30
### Active Help for nouns
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    31
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    32
Adding Active Help when completing a noun is done within the `ValidArgsFunction(...)` of a command.  Please notice the use of `cobra.AppendActiveHelp(...)` in the following example:
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    33
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    34
```go
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    35
cmd := &cobra.Command{
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    36
	Use:   "add [NAME] [URL]",
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    37
	Short: "add a chart repository",
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    38
	Args:  require.ExactArgs(2),
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    39
	RunE: func(cmd *cobra.Command, args []string) error {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    40
		return addRepo(args)
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    41
	},
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    42
	ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    43
		var comps []string
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    44
		if len(args) == 0 {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    45
			comps = cobra.AppendActiveHelp(comps, "You must choose a name for the repo you are adding")
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    46
		} else if len(args) == 1 {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    47
			comps = cobra.AppendActiveHelp(comps, "You must specify the URL for the repo you are adding")
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    48
		} else {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    49
			comps = cobra.AppendActiveHelp(comps, "This command does not take any more arguments")
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    50
		}
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    51
		return comps, cobra.ShellCompDirectiveNoFileComp
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    52
	},
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    53
}
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    54
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    55
The example above defines the completions (none, in this specific example) as well as the Active Help messages for the `helm repo add` command.  It yields the following behavior:
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    56
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    57
bash-5.1$ helm repo add [tab]
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    58
You must choose a name for the repo you are adding
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    59
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    60
bash-5.1$ helm repo add grafana [tab]
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    61
You must specify the URL for the repo you are adding
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    62
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    63
bash-5.1$ helm repo add grafana https://grafana.github.io/helm-charts [tab]
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    64
This command does not take any more arguments
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    65
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    66
**Hint**: As can be seen in the above example, a good place to use Active Help messages is when the normal completion system does not provide any suggestions. In such cases, Active Help nicely supplements the normal shell completions.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    67
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    68
### Active Help for flags
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    69
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    70
Providing Active Help for flags is done in the same fashion as for nouns, but using the completion function registered for the flag.  For example:
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    71
```go
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    72
_ = cmd.RegisterFlagCompletionFunc("version", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    73
		if len(args) != 2 {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    74
			return cobra.AppendActiveHelp(nil, "You must first specify the chart to install before the --version flag can be completed"), cobra.ShellCompDirectiveNoFileComp
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    75
		}
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    76
		return compVersionFlag(args[1], toComplete)
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    77
	})
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    78
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    79
The example above prints an Active Help message when not enough information was given by the user to complete the `--version` flag.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    80
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    81
bash-5.1$ bin/helm install myrelease --version 2.0.[tab]
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    82
You must first specify the chart to install before the --version flag can be completed
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    83
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    84
bash-5.1$ bin/helm install myrelease bitnami/solr --version 2.0.[tab][tab]
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    85
2.0.1  2.0.2  2.0.3
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    86
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    87
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    88
## User control of Active Help
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    89
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    90
You may want to allow your users to disable Active Help or choose between different levels of Active Help.  It is entirely up to the program to define the type of configurability of Active Help that it wants to offer, if any.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    91
Allowing to configure Active Help is entirely optional; you can use Active Help in your program without doing anything about Active Help configuration.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    92
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    93
The way to configure Active Help is to use the program's Active Help environment
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    94
variable.  That variable is named `<PROGRAM>_ACTIVE_HELP` where `<PROGRAM>` is the name of your 
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    95
program in uppercase with any `-` replaced by an `_`.  The variable should be set by the user to whatever
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    96
Active Help configuration values are supported by the program.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    97
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    98
For example, say `helm` has chosen to support three levels for Active Help: `on`, `off`, `local`.  Then a user
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    99
would set the desired behavior to `local` by doing `export HELM_ACTIVE_HELP=local` in their shell.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   100
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   101
For simplicity, when in `cmd.ValidArgsFunction(...)` or a flag's completion function, the program should read the
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   102
Active Help configuration using the `cobra.GetActiveHelpConfig(cmd)` function and select what Active Help messages
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   103
should or should not be added (instead of reading the environment variable directly).
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   104
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   105
For example:
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   106
```go
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   107
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   108
	activeHelpLevel := cobra.GetActiveHelpConfig(cmd)
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   109
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   110
	var comps []string
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   111
	if len(args) == 0 {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   112
		if activeHelpLevel != "off"  {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   113
			comps = cobra.AppendActiveHelp(comps, "You must choose a name for the repo you are adding")
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   114
		}
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   115
	} else if len(args) == 1 {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   116
		if activeHelpLevel != "off" {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   117
			comps = cobra.AppendActiveHelp(comps, "You must specify the URL for the repo you are adding")
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   118
		}
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   119
	} else {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   120
		if activeHelpLevel == "local" {
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   121
			comps = cobra.AppendActiveHelp(comps, "This command does not take any more arguments")
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   122
		}
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   123
	}
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   124
	return comps, cobra.ShellCompDirectiveNoFileComp
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   125
},
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   126
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   127
**Note 1**: If the `<PROGRAM>_ACTIVE_HELP` environment variable is set to the string "0", Cobra will automatically disable all Active Help output (even if some output was specified by the program using the `cobra.AppendActiveHelp(...)` function).  Using "0" can simplify your code in situations where you want to blindly disable Active Help without having to call `cobra.GetActiveHelpConfig(cmd)` explicitly.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   128
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   129
**Note 2**: If a user wants to disable Active Help for every single program based on Cobra, she can set the environment variable `COBRA_ACTIVE_HELP` to "0".  In this case `cobra.GetActiveHelpConfig(cmd)` will return "0" no matter what the variable `<PROGRAM>_ACTIVE_HELP` is set to.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   130
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   131
**Note 3**: If the user does not set `<PROGRAM>_ACTIVE_HELP` or `COBRA_ACTIVE_HELP` (which will be a common case), the default value for the Active Help configuration returned by `cobra.GetActiveHelpConfig(cmd)` will be the empty string. 
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   132
## Active Help with Cobra's default completion command
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   133
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   134
Cobra provides a default `completion` command for programs that wish to use it.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   135
When using the default `completion` command, Active Help is configurable in the same
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   136
fashion as described above using environment variables.  You may wish to document this in more
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   137
details for your users.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   138
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   139
## Debugging Active Help
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   140
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   141
Debugging your Active Help code is done in the same way as debugging your dynamic completion code, which is with Cobra's hidden `__complete` command.  Please refer to [debugging shell completion](shell_completions.md#debugging) for details.
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   142
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   143
When debugging with the `__complete` command, if you want to specify different Active Help configurations, you should use the active help environment variable.  That variable is named `<PROGRAM>_ACTIVE_HELP` where any `-` is replaced by an `_`.  For example, we can test deactivating some Active Help as shown below:
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   144
```
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   145
$ HELM_ACTIVE_HELP=1 bin/helm __complete install wordpress bitnami/h<ENTER>
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   146
bitnami/haproxy
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   147
bitnami/harbor
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   148
_activeHelp_ WARNING: cannot re-use a name that is still in use
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   149
:0
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   150
Completion ended with directive: ShellCompDirectiveDefault
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   151
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   152
$ HELM_ACTIVE_HELP=0 bin/helm __complete install wordpress bitnami/h<ENTER>
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   153
bitnami/haproxy
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   154
bitnami/harbor
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   155
:0
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   156
Completion ended with directive: ShellCompDirectiveDefault
445e01aede7e Update vendor directory
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
   157
```