mirror of
https://github.com/spf13/cobra
synced 2025-05-05 12:57:22 +00:00
Update comments that still referred to bash completion
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
This commit is contained in:
parent
5359c17d36
commit
b8fd1be9f5
2 changed files with 6 additions and 6 deletions
11
command.go
11
command.go
|
@ -63,9 +63,9 @@ type Command struct {
|
|||
// Example is examples of how to use the command.
|
||||
Example string
|
||||
|
||||
// ValidArgs is list of all valid non-flag arguments that are accepted in bash completions
|
||||
// ValidArgs is list of all valid non-flag arguments that are accepted in shell completions
|
||||
ValidArgs []string
|
||||
// ValidArgsFunction is an optional function that provides valid non-flag arguments for bash completion.
|
||||
// ValidArgsFunction is an optional function that provides valid non-flag arguments for shell completion.
|
||||
// It is a dynamic version of using ValidArgs.
|
||||
// Only one of ValidArgs and ValidArgsFunction can be used for a command.
|
||||
ValidArgsFunction func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective)
|
||||
|
@ -74,11 +74,12 @@ type Command struct {
|
|||
Args PositionalArgs
|
||||
|
||||
// ArgAliases is List of aliases for ValidArgs.
|
||||
// These are not suggested to the user in the bash completion,
|
||||
// These are not suggested to the user in the shell completion,
|
||||
// but accepted if entered manually.
|
||||
ArgAliases []string
|
||||
|
||||
// BashCompletionFunction is custom functions used by the bash autocompletion generator.
|
||||
// BashCompletionFunction is custom bash functions used by the legacy bash autocompletion generator.
|
||||
// For portability with other shells, it is recommended to instead use ValidArgsFunction
|
||||
BashCompletionFunction string
|
||||
|
||||
// Deprecated defines, if this command is deprecated and should print this string when used.
|
||||
|
@ -938,7 +939,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
|
|||
args = os.Args[1:]
|
||||
}
|
||||
|
||||
// initialize the hidden command to be used for bash completion
|
||||
// initialize the hidden command to be used for shell completion
|
||||
c.initCompleteCmd(args)
|
||||
|
||||
var flags []string
|
||||
|
|
|
@ -34,7 +34,6 @@ const (
|
|||
|
||||
// ShellCompDirectiveNoFileComp indicates that the shell should not provide
|
||||
// file completion even when no completion is provided.
|
||||
// This currently does not work for zsh or bash < 4
|
||||
ShellCompDirectiveNoFileComp
|
||||
|
||||
// ShellCompDirectiveFilterFileExt indicates that the provided completions
|
||||
|
|
Loading…
Add table
Reference in a new issue