Skip to content

fix(fish): parse completion tokens with read on Fish 4.1+ - #940

Draft
aryansk wants to merge 1 commit into
apple:mainfrom
aryansk:codex/issue-819-fish-tokenize-raw
Draft

fix(fish): parse completion tokens with read on Fish 4.1+#940
aryansk wants to merge 1 commit into
apple:mainfrom
aryansk:codex/issue-819-fish-tokenize-raw

Conversation

@aryansk

@aryansk aryansk commented Aug 3, 2026

Copy link
Copy Markdown

Fixes #819.

Fish 4.1 introduced read --tokenize-raw for parsing command lines without losing quoting or redirect operators. This change uses it for Fish 4.1+ completion scripts while preserving the existing paths for Fish 4.0 and Fish 3.x. The -tC cursor-position query continues to use commandline directly.

Updated the Fish completion snapshots for unit and example coverage.

Validation:

  • swift test --parallel
  • swift-format lint --strict Sources/ArgumentParser/Completions/FishCompletionsGenerator.swift
  • Fish 4.8 raw redirect and cursor checks
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fish 4.1+ completion scripts should parse the command line by using read instead of by using commandline

1 participant