Skip to content

Use LF line endings for shell completion output#3279

Closed
felmonon wants to merge 2 commits into
pallets:mainfrom
felmonon:fix-zsh-source-line-endings
Closed

Use LF line endings for shell completion output#3279
felmonon wants to merge 2 commits into
pallets:mainfrom
felmonon:fix-zsh-source-line-endings

Conversation

@felmonon
Copy link
Copy Markdown

Summary

  • write shell completion source and completion output as bytes to bypass platform newline translation
  • preserve LF line endings for zsh completion scripts on Windows/MSYS environments
  • add a regression test that simulates a CRLF-translating text stdout and verifies zsh source output stays LF-only

Testing

  • PYTHONPATH=src python3 -m pytest tests/test_shell_completion.py

Fixes #3277

@davidism davidism closed this Mar 21, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 5, 2026
@kdeldycke kdeldycke added windows Issues pertaining to the Windows environment f:completion feature: shell completion labels May 21, 2026
@kdeldycke kdeldycke added this to the 8.4.1 milestone May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f:completion feature: shell completion windows Issues pertaining to the Windows environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zsh completion setup fails with 'parse error near elif'

3 participants