Skip to content

Commit

Permalink
[#969] Reorganized code a little bit to facilitate (hopefully) comple…
Browse files Browse the repository at this point in the history
…tion support for nested sub-subcommands; simplify code
  • Loading branch information
remkop committed Mar 21, 2020
1 parent 953d52c commit 99ac5c9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ private SystemCompleter compileCompleters(SystemCompleter completer, CommandLine
completer.addAliases(extractAliases(cmd));

for (Map.Entry<String, CommandLine> entry : cmd.getSubcommands().entrySet()) {
CommandSpec sub = entry.getValue().getCommandSpec();
registerCompleters(completer, entry.getKey(), sub);
CommandLine sub = entry.getValue();
registerCompleters(completer, entry.getKey(), sub.getCommandSpec());

// TODO support nested sub-subcommands (https://github.com/remkop/picocli/issues/969)
// Is the below sufficient?
// compileCompleters(completer, sub.commandLine());
// compileCompleters(completer, sub);
}
return completer;
}
Expand Down

0 comments on commit 99ac5c9

Please sign in to comment.