I've gotten something like using walkers to walk the structure but I'm ending up overriding some of the GLI stuff as well, can we add a way to grab the current path to whichever command we are running instead of the only giving the name, like say if I had
pre do |global_options, command, options, args|
SomeClass.some_class_method(command.path)
end
If input was 'memberships list',
gli:memberships:list or
$0:memberships:list
separator wouldn't really matter as long as you could str.split using it, like "\n", "|", ":", "/"
putting the path in a array would work as well, so like
[$0, 'memberships', 'list']
I know Command#parent has the command's ancestors and Command#commandshas its children, but beyond that, I basically would have to go recursive-happy to get all the variations
I've gotten something like using walkers to walk the structure but I'm ending up overriding some of the GLI stuff as well, can we add a way to grab the current path to whichever command we are running instead of the only giving the name, like say if I had
If input was 'memberships list',
gli:memberships:list
or$0:memberships:list
separator wouldn't really matter as long as you could str.split using it, like"\n"
,"|"
,":"
,"/"
putting the path in a array would work as well, so likeI know
Command#parent
has the command's ancestors andCommand#commands
has its children, but beyond that, I basically would have to go recursive-happy to get all the variations