Skip to content

Conversation

@ReneSoltes
Copy link

This pull request addresses issue #3043 by correctly handling multiline help strings when generating shell completion scripts for the fish shell.

Problem:
Previously, commands with multiline help text would cause errors or incorrect completion behavior in fish shell due to improper escaping of newlines within the help strings.

Changes:

  • Modified src/click/shell_completion.py to correctly escape newline characters (\n) within help texts before outputting them to the fish completion script.
  • Added a new test case tests/test_shell_completion.py::test_fish_multiline_help_complete to specifically verify that multiline help strings are processed correctly and do not cause errors.
  • The CHANGES.rst file has been updated to include this fix, referencing issue Multi-line help text is not handled correctly in fish #3043.
  • The .gitignore file was also updated as part of the pre-commit hooks.

fixes #3043

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.

2 participants