Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
nkakouros opened this issue Jan 22, 2018 · 1 comment · May be fixed by #252
Open
3 tasks done

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

nkakouros opened this issue Jan 22, 2018 · 1 comment · May be fixed by #252

Comments

@nkakouros
Copy link

nkakouros commented Jan 22, 2018

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.

@shafiqalibhai
Copy link

+1

nkakouros added a commit to nkakouros-forks/go-script-bash that referenced this issue May 9, 2019
@nkakouros nkakouros linked a pull request May 9, 2019 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants