mirror of https://github.com/docker/compose.git
Merge pull request #10879 from relrelb/project_directory_completion
Improve shell completion for `--project-directory`
This commit is contained in:
commit
5bbdf3d84a
|
@ -442,6 +442,12 @@ func RootCommand(streams command.Cli, backend api.Service) *cobra.Command { //no
|
||||||
"project-name",
|
"project-name",
|
||||||
completeProjectNames(backend),
|
completeProjectNames(backend),
|
||||||
)
|
)
|
||||||
|
c.RegisterFlagCompletionFunc( //nolint:errcheck
|
||||||
|
"project-directory",
|
||||||
|
func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||||
|
return []string{}, cobra.ShellCompDirectiveFilterDirs
|
||||||
|
},
|
||||||
|
)
|
||||||
c.RegisterFlagCompletionFunc( //nolint:errcheck
|
c.RegisterFlagCompletionFunc( //nolint:errcheck
|
||||||
"file",
|
"file",
|
||||||
func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||||
|
|
Loading…
Reference in New Issue