Commit Graph

7 Commits

Author SHA1 Message Date
Mahmoud Al-Qudsi
d4ed2ca447 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.

(cherry picked from commit b61c4f1cbc)
2017-10-05 13:56:24 +02:00
Mahmoud Al-Qudsi
429bdce4f1 Document reasons for commmand name replacement in pip2/3 completions 2017-10-05 13:32:56 +02:00
Mahmoud Al-Qudsi
d74d3f2ca4 Use string replace instead of sed with better regex for pip completions 2017-10-05 13:21:26 +02:00
Mahmoud Al-Qudsi
0c21efea55 fixup! Force correct names for pip2/pip3 command in completions
(cherry picked from commit af12bcb117)
2017-10-05 13:12:15 +02:00
Mahmoud Al-Qudsi
3f9273cc32 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:07:11 +02:00
Aaron Gyes
df6a86913c pip completions: use builtin source rather than eval function. 2017-10-04 21:56:28 -07:00
Cristian Prieto
835a40bf56 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:16:12 -07:00