Switch to built-in Readline file/directory completion capability as
they more visually rich and convenient.
--- a/.bash_completion.d/pip Fri Feb 20 00:23:29 2015 +0200
+++ b/.bash_completion.d/pip Fri Feb 20 01:26:29 2015 +0200
@@ -29,7 +29,7 @@
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
--cert|--log|--log-file)
- COMPREPLY=( $(compgen -d -- "$cur") )
+ compopt -o default; COMPREPLY=()
return 0 ;;
--exists-action)
COMPREPLY=( $(compgen -W '$_acts' -- "$cur") )
@@ -39,10 +39,10 @@
install)
case $prev in
-e|--editable|-b|--build|-t|--target|-d|--download|--download-cache)
- COMPREPLY=( $(compgen -d -- "$cur") )
+ compopt -o dirnames; COMPREPLY=()
return 0 ;;
-r|--requirement)
- COMPREPLY=( $(compgen -f -- "$cur") )
+ compopt -o default; COMPREPLY=()
return 0 ;;
esac
COMPREPLY=( $(compgen -W '$_install_opts $_opts $_index_opts' -- "$cur") )
@@ -50,7 +50,7 @@
uninstall)
case $prev in
-r|--requirement)
- COMPREPLY=( $(compgen -f -- "$cur") )
+ compopt -o default; COMPREPLY=()
return 0 ;;
esac
COMPREPLY=( $(compgen -W '$_uninstall_opts $_opts' -- "$cur") )
@@ -61,7 +61,7 @@
freeze)
case $prev in
-r|--requirement)
- COMPREPLY=( $(compgen -f -- "$cur") )
+ compopt -o default; COMPREPLY=()
return 0 ;;
esac
COMPREPLY=( $(compgen -W '$_freeze_opts $_opts' -- "$cur") )
@@ -75,10 +75,10 @@
wheel)
case $prev in
-w|--wheel-dir|--download-cache|-b|--build)
- COMPREPLY=( $(compgen -d -- "$cur") )
+ compopt -o dirnames; COMPREPLY=()
return 0 ;;
-r|--requirement)
- COMPREPLY=( $(compgen -f -- "$cur") )
+ compopt -o default; COMPREPLY=()
return 0 ;;
esac
COMPREPLY=( $(compgen -W '$_wheel_opts $_opts $_index_opts' -- "$cur") )