Skip to content

@go.show_subcommands returns only subcommands from the first command #238

Open
@nkakouros

Description

@nkakouros

Due diligence

Framework, Bash, and operating system version information

_GO_CORE_VERSION:         v1.7.0
BASH_VERSION:             4.4.12(1)-release
OSTYPE:                   linux-gnu
_GO_PLATFORM_ID:          arch
_GO_PLATFORM_VERSION_ID:  

Description

Given a script structure like this:

scripts/
  command
  command.d/
    subcommand1
    subcommand2
    subcommand2.d/
      subsub1
      subsub2

adding:

. "$_GO_USE_MODULES" 'subcommands'                            
@go.show_subcommands

to subcommand2 will print:

Available subcommands of "subcommand2" are:

subcommand1   No description available
subcommand2   No description available

when

Available subcommands of "subcommand2" are:

subsub1   No description available
subsub2   No description available

should be printed.

The reason seems to be that @go.show_subcommands uses the $_GO_CMD_NAME to find the subcommands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions