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

Set "y" to default option when prompting to install from requirements.txt #181

Open
hyerrakalva opened this issue Sep 6, 2022 · 2 comments

Comments

@hyerrakalva
Copy link

Issue Details

Many package managers (like apt, pacman, etc.) have "y" set as the default option when prompting for a yes/no answer prior to installing/removing a package. Likewise, when this plugin prompts to install dependencies from requirements.txt or any other file, if the user hits the enter key without specifying a y/n value, the plugin should assume a value of "y", mainly to go along with the user's muscle memory of directly hitting the enter key to imply a yes.

I'm willing to work on a PR for this if you agree with what I said.

Operating System (uname -a)

Linux DESKTOP-GCI1HKQ 5.15.57.1-microsoft-standard-WSL2 #1 SMP Wed Jul 27 02:20:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

zsh version (zsh --version)

zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

autoswitch-virtualenv version

echo "$AUTOSWITCH_VERSION"
3.6.0

How is zsh-autoswitch-virtualenv installed?

  • Antigen

Steps to reproduce the issue

  • cd into the folder of a python project that contains a requirements.txt but does not have a .venv file or any virtualenv-related files/folders present
  • Run mkvenv
  • When it prompts you to install packages from requirements.txt, hit the enter key without inputting a "y" or "n" value
  • You will see that the plugin interprets this as a no, which is the opposite behavior from what you are used to from another CLI program like a package manager

gist link to your zshrc

https://github.com/hyerrakalva/dotfiles/blob/master/.zshrc

@MichaelAquilina
Copy link
Owner

@hyerrakalva sounds good to me. I thought this was already implemented but looks like I was wrong!

Would you like to attempt this in a PR :) ?

@hyerrakalva
Copy link
Author

@MichaelAquilina sure!

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

No branches or pull requests

2 participants