(The main difference is calling completion.tryArgsCompletion in place of
argParser.parse and returning early when it returns null.)
This will add a "completion" command to your app, which the shell will use to
complete arguments.
To generate the setup script automatically, call generateCompletionScript with
the names of the executables that your Dart script runs as (typically just one,
but it could be more), along with the target Shell.