Commit graph

9 commits

Author SHA1 Message Date
Fabian Homborg
d8b1f0715f [pip* completions] Silence stderr
For some reason, these tools print an upgrade message to stderr, even
when stdout goes somewhere else.
2018-05-03 11:32:18 +02:00
Mahmoud Al-Qudsi
b61c4f1cbc Correct string replace usage in pip2/3 completions
\b does not match "end of spaces" but rather "start of a-z/0-9" and so
does not match the start of string '-c'. Match (and then re-insert) a
literal ' ' as part of the pattern instead.
2017-10-05 13:54:47 +02:00
Mahmoud Al-Qudsi
04bde6cf5b Document reasons for commmand name replacement in pip2/3 completions
(cherry picked from commit 429bdce4f1)
2017-10-05 13:33:45 +02:00
Mahmoud Al-Qudsi
78fe53406e Fix copy-and-paste pip3 -> pip2 typo
Thanks @floam. See #4448
2017-10-05 13:26:56 +02:00
Mahmoud Al-Qudsi
7e48f5cc4f Use string replace instead of sed with better regex for pip completions
(cherry picked from commit d74d3f2ca4)
2017-10-05 13:25:14 +02:00
Mahmoud Al-Qudsi
af12bcb117 fixup! Force correct names for pip2/pip3 command in completions 2017-10-05 13:11:14 +02:00
Mahmoud Al-Qudsi
b11ca2c01c Force correct names for pip2/pip3 command in completions
Work around bug pypa/pip#4755
Don't expect all users to be running a version of pip2/3 that includes
the fix (once it's upstreamed). Will continue to work if/when pip2/3
emit the correct output. pip is already very slow at printing the
completions (see #4448) so the `sed` call overhead is neglible.
2017-10-05 13:03:24 +02:00
Aaron Gyes
d740b2a473 pip completions: use builtin source rather than eval function. 2017-10-04 21:50:09 -07:00
Cristian Prieto
1770e47eb0 Python's pip and pipenv completions (#4448)
* Add pip completion

 * We call native pip completion for fish if pip is installed

* Add pipenv completion

 * We call pipenv native completion if pipenv is installed

* Applied changes as requested by @floam

 * Changed usage of `test (command -v)` for just `command -sq`

* Add completions for pip2/3

 * In some systems pip is not aliased and we have pip2 and pip3
 * In those cases, we just load the completions for those commands

* Separate pip2/3 completions in their own file as requested by @floam
2017-10-04 21:15:41 -07:00