Skip to content

Feature request: Allow spaces in plugin names in order to enable sub-commands #888

@dhague

Description

@dhague

kubectl allows plugins with spaces in the name to provide the user experience of sub-commands:

a plugin that wishes to be invoked whenever the command kubectl foo bar baz is invoked by the user, would have the filename of kubectl-foo-bar-baz

krew does not allow for this option, because it uses .metadata.name for the plugin name, and this cannot have spaces. Any hyphens in the name get translated to underscores in the filename, which kubectl translates back to hyphens in the command name.

This could be resolved by having an optional field in the Plugin YAML, .spec.command which could be set to an array of strings much like the spec.containers.command field in a Kubernetes Pod. For example:

apiVersion: krew.googlecontainertools.github.com/v1alpha3
kind: Plugin
metadata:
  name: foo-bar-baz
spec:
  command: ["foo", "bar", "baz"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions