Skip to content

tab completion for plugin commands #1116

@m67hoff

Description

@m67hoff

Hy
it seems tab completion for plugin commands is not working. Hope this can be fixed / added ?
Thanks for looking into this - Michael

Some details:
It seems that cf-cli is generating its own "tab completion"-wordlist when GO_FLAGS_COMPLETION is set. (from /usr/local/etc/bash_completion.d/cf-cli:)
COMPREPLY=($(GO_FLAGS_COMPLETION=1 ${COMP_WORDS[0]} "${args[@]}"))

cf-cli itself knows about installed plugin commands (see cf -h -a)

...
INSTALLED PLUGIN COMMANDS:
   delete-target                          Delete a saved target
   save-target                            Save current target
   set-target                             Set current target
   targets                                List available targets
   copy                                   Copy current space artifacts to another space. Uses targets saved by 'Targets' plugin when copying to another Cloud Foundry target.
   sync                                   Synchronize a folder to a container directory.
   top                                    Displays top stats - by Kurt Kellner of ECS Team
...

However if run with GO_FLAGS_COMPLETION e.g.:
GO_FLAGS_COMPLETION=1 cf s

The plugin commands are missing. So also (bash) tab completion can't work for plugins.

I'm running on the release:
cf version 6.26.0+9c9a261fd.2017-04-06

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions