Skip to content

zsh completion candidates are offered only once for Sequence @Arguments #776

@rgoldberg

Description

@rgoldberg

zsh completion candidates are offered only once for Sequence @Arguments.

A * must be prepended to the arg_spec for the @Argument. I just do not know how to determine in argumentSpecAndSetupScript if the ArgumentDefinition (ArgumentInfoV0 after the switch to ToolInfoV0) is for a var whose type is Sequence or not.

ArgumentParser version: main
Swift version:
swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
Target: arm64-apple-macosx15.0

Checklist

  • If possible, I've reproduced the issue using the main branch of this package
  • I've searched for existing GitHub issues

Steps to Reproduce

Swift @Argument (sole argument or parameter for the Command):

@Argument(help: ArgumentHelp("App ID", valueName: "app-id"), completion: .custom(appIDCompletions))
var appIDs: [AppID]

No completion candidates are offered if completion candidates are requested at the end of the following zsh command line:

mycommand 123 4

Expected behavior

Completion candidates are offered.

Actual behavior

No completion candidates are offered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions