-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
C: autocompleteAutocompletion in shells (pip completion)Autocompletion in shells (pip completion)auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automationkind: crashFor situations where pip crashesFor situations where pip crashes
Milestone
Description
Environment
- pip version: 18.0
- Python version: 3.7.0
- OS: macOS High Sierra
Using iTerm2 3.1.7 or Terminal.app.
Description
Attempt pip install -U projectname with tab completion.
Expected behavior
Tab completion works, or at least no error.
How to Reproduce
- Type
pip install -Uorpip install --upgradethen a few letters of a project name (eg. justpbelow), then press the tab key. - An error occurs:
Output
$ pip install --upgrade pTraceback (most recent call last):
File "/usr/local/bin/pip3", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/pip/_internal/__init__.py", line 293, in main
autocomplete()
File "/usr/local/lib/python3.7/site-packages/pip/_internal/__init__.py", line 121, in autocomplete
cwords, cword, subcommand.parser.option_list_all,
File "/usr/local/lib/python3.7/site-packages/pip/_internal/__init__.py", line 170, in get_path_completion_type
for x in opt.metavar.split('/')):
AttributeError: 'NoneType' object has no attribute 'split'Notes
-
When omitting
-Uor--upgrade, pressing tab doesn't complete anything but more importantly there's no error. -
No error with pip 18.0 on Python 2.7.15. Pressing tab suggests files/directories in current dir (with and without
-U).
pedrohdz
Metadata
Metadata
Assignees
Labels
C: autocompleteAutocompletion in shells (pip completion)Autocompletion in shells (pip completion)auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automationkind: crashFor situations where pip crashesFor situations where pip crashes