CompletionCommand constructor

CompletionCommand({
  1. CompletionFileWriter? createFile,
  2. String? longDescription,
  3. List<String>? aliases,
})

The command's inputs are intrinsic to what it does, so they are declared here rather than accepted from a caller: a CompletionCommand that could be built without them would have a run that reads handles the parser never registered.

Implementation

new({CompletionFileWriter? createFile, super.longDescription, super.aliases})
  : createFile = createFile ?? _writeToFile,
    super(
      mandatoryPositionals: [shellInput],
      discretionaryPositionals: [pathInput],
    );