Skip to content

quote BASH_VERSION to avoid special characters on Windows#2462

Merged
davidism merged 1 commit into
pallets:8.1.xfrom
liooil:patch-1
Jun 29, 2023
Merged

quote BASH_VERSION to avoid special characters on Windows#2462
davidism merged 1 commit into
pallets:8.1.xfrom
liooil:patch-1

Conversation

@liooil
Copy link
Copy Markdown
Contributor

@liooil liooil commented Mar 3, 2023

#2461
wrap BASH_VERSION with "" to avoid "(" ")" in BASH_VERSION

  • fixes #

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

@davidism davidism added this to the 8.1.4 milestone Mar 3, 2023
saroad2
saroad2 previously requested changes May 9, 2023
Copy link
Copy Markdown
Contributor

@saroad2 saroad2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hery @liooil , thanks for your contribution!

I was asking myself: why not simply use os.environ here if we are just looking for environment variable? Is there a specific reason we are not using it?

@davidism , it might be a question you could help us answer.

Comment thread src/click/shell_completion.py
@davidism davidism linked an issue Jun 29, 2023 that may be closed by this pull request
@davidism davidism changed the base branch from main to 8.1.x June 29, 2023 19:14
@davidism
Copy link
Copy Markdown
Member

why not simply use os.environ here

It's only available directly in a bash shell process, not in launched processes. It's also only available from bash, but you may want to generate the file from another shell.

@davidism davidism changed the title fix #2461 quote BASH_VERSION to avoid special characters on Windows Jun 29, 2023
@davidism davidism merged commit bdb81e4 into pallets:8.1.x Jun 29, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bash completion not working in git-for-windows

3 participants