anchor.diff:  Where `git` (actually `java picocli.Demo$Git`) is the top-level command, followed by a global option and a subcommand `status` with its own options.
   
   Setting up the parser and parsing the command line could look like this:
  -[source,java]
  +
  +.Java
  +[source,java,role="primary"]
   ----
   public static void main(String... args) {
       // Set up the parser
  
positive.code: }
  ----
  
  Users can specify the `-v` option on either the top-level command or on the subcommand, and it will have the same effect.
  
  ----
  
negative.code: }
  ----
  
  .Kotlin
  [source,kotlin,role="secondary"]
  ----
  private fun handleParseResult(parsed: CommandLine.ParseResult) {
      assert(parsed.subcommand() != null) { "at least 1 command and 1 subcommand found" }
  
      val sub = parsed.subcommand()
      assert(parsed.commandSpec().userObject().javaClass == Git::class.java) { "main command" }
      assert(sub.commandSpec().userObject().javaClass == GitStatus::class.java) { "subcommand" }
  
      val git = parsed.commandSpec().userObject() as Git
      assert(git.gitDir == File("/home/rpopma/picocli"))
  
      val gitstatus = sub.commandSpec().userObject() as GitStatus
      assert(gitstatus.shortFormat)               { "git status -s" }
      assert(gitstatus.branchInfo)                { "git status -b" }
      assert(!gitstatus.showIgnored)              { "git status --showIgnored not specified" }
      assert(gitstatus.mode === GitStatusMode.no) { "git status -u=no" }
  }
  ----
  
  You may be interested in the <<Executing Commands,execute method>> to reduce error handling and other boilerplate code in your application.
  See also the previous section, <<Executing Subcommands>>.
  
  === Nested sub-Subcommands
  
  When registering subcommands declaratively, subcommands can be nested by specifying the `subcommands` attribute on subcommand classes:
  
  .Java
  [source,java,role="primary"]
  ----
  @Command(name = "main", subcommands = {
      ChildCommand1.class,
  