anchor.diff:      @Option(names = {"-d", "--directory"},
               description = "this option applies to all subcommands")
       File baseDirectory;
  +}
  +----
  +
  +.Groovy
  +[source,groovy,role="secondary"]
  +----
  +@Command(name = "fileutils", subcommands = [ListFiles.class])
  +class FileUtils {
  +
  +    @Option(names = ["-d", "--directory"],
  +            description = "this option applies to all subcommands")
  +    def baseDirectory;
   }
   ----
   
  
positive.code:         .addSubcommand("tag",      new GitTag());
  ----
  
  .Kotlin
  [source,kotlin,role="secondary"]
  ----
  
negative.code:         MyApp app = new MyApp();
          new CommandLine(app)
                  .setExecutionStrategy(app::executionStrategy)
                  .execute(args);
      }
  
      // ...
  }
  ----
  
  .Groovy
  [source,groovy,role="secondary"]
  ----
  @Command(subcommands = [Sub1.class, Sub2.class, Sub3.class])
  class MyApp implements Runnable {
  
      // A reference to this method can be used as a custom execution strategy
      // that first calls the init() method,
      // and then delegates to the default execution strategy.
      def int executionStrategy(ParseResult parseResult) {
          init(); // custom initialization to be done before executing any command or subcommand
          return new CommandLine.RunLast().execute(parseResult); // default execution strategy
      }
  
      def void init() {
          // ...
      }
  
      public static void main(String[] args) {
          def app = new MyApp();
          new CommandLine(app)
                  .setExecutionStrategy(app.&executionStrategy)
                  .execute(args);
      }
  
  