Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell completion bash version check fail in git-bash on windows #2638

Open
koliyo opened this issue Nov 29, 2023 · 0 comments · May be fixed by #2639
Open

Shell completion bash version check fail in git-bash on windows #2638

koliyo opened this issue Nov 29, 2023 · 0 comments · May be fixed by #2639

Comments

@koliyo
Copy link

koliyo commented Nov 29, 2023

I'm using windows with git-bash, and trying to set up bash shell completion following the readme.

I have added the following to my .bashrc

eval "$(_VREX_COMPLETE=bash_source vrex)"

But I get this error in new shell instances:

The file cannot be accessed by the system.

I have traced this to the subprocess execution of bash to check the version.

The problem is that the bash executable name is not working from my standard windows python installation.
Instead I need to explicitly add the full path to the git-bash executable, which is C:\Program Files\Git\bin\bash.exe

I have a working patch locally with using shutil.which('bash') to locate bash, which should work on all platforms. PR coming after this issue is submitted.

This is somewhat related to #2461, but that is a different issue, but both are specific to git-bash in windows.

Environment:

  • Python version: 3.12.0
  • Click version: 8.1.7
@koliyo koliyo linked a pull request Nov 29, 2023 that will close this issue
6 tasks
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 a pull request may close this issue.

1 participant