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

pip autocompletion should silence of KeyboardInterrupts #3942

Closed
anntzer opened this issue Aug 31, 2016 · 2 comments · Fixed by #5924
Closed

pip autocompletion should silence of KeyboardInterrupts #3942

anntzer opened this issue Aug 31, 2016 · 2 comments · Fixed by #5924
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on type: enhancement Improvements to functionality

Comments

@anntzer
Copy link
Contributor

anntzer commented Aug 31, 2016

  • Pip version: 8.1.2
  • Python version: 3.5.2
  • Operating System: Arch Linux

Description:

pip uninstall <TAB> quickly followed by Ctrl-C causes a traceback (associated with the KeyboardInterrupt) to be printed. This traceback should arguably not be displayed.

A simple fix would be to change pip completion --zsh (and similarly --bash) to

# pip zsh completion start
function _pip_completion {
  local words cword
  read -Ac words
  read -cn cword
  reply=( $( COMP_WORDS="$words[*]" \
             COMP_CWORD=$(( cword-1 )) \
             PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null ) ) # note the redirection.
}
compctl -K _pip_completion pip
# pip zsh completion end
@pradyunsg pradyunsg added good first issue A good item for first time contributors to work on type: enhancement Improvements to functionality labels Jun 29, 2017
@DavidBord
Copy link
Contributor

I didn't succeed in reproducing this issue with pip uninstall but I was able to interrupt pip freeze quite successfully

@cjerdonek
Copy link
Member

Can you include the traceback in the issue so others can see what the problem is?

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Sep 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on type: enhancement Improvements to functionality
Projects
None yet
4 participants