Skip to content

Conversation

@Blacksmoke16
Copy link
Member

Context

Previously if you were to try an execute a command that is the name of a namespace you'd get output like:

  Command 'foo' is not defined.

  Did you mean one of these?
      afoobar
      afoobar1
      afoobar2
      foo1:bar
      foo:bar
      foo:bar1

Which isn't all that helpful. This PR makes it better handle this context by displaying the commands in that namespace:

MyCLI 1.2.3

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands for the 'foo' namespace:
  foo:bar   [afoobar] The foo:bar command
  foo:bar1  [afoobar1] The foo:bar1 command

Changelog

  • List commands in a namespace when using it as the command name
  • Use single quotes in text descriptor to quote values in the output

@Blacksmoke16 Blacksmoke16 added component:console kind:enhancement New functionality to an existing feature labels Jun 22, 2024
@Blacksmoke16 Blacksmoke16 merged commit e8aa7d6 into master Jun 22, 2024
@Blacksmoke16 Blacksmoke16 deleted the list-namespaces branch June 22, 2024 03:33
PallasAthenaie pushed a commit to athena-framework/console that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:console kind:enhancement New functionality to an existing feature

Development

Successfully merging this pull request may close these issues.

2 participants