Do not assume all --foo= options take filenames in generic long option completion, assume only that --*file*= does, and that --*dir*= takes dirs.
This commit is contained in:
parent
bce0b30bbe
commit
b556b22d87
2
CHANGES
2
CHANGES
@ -38,6 +38,8 @@ bash-completion (1.x)
|
|||||||
generic long option completion.
|
generic long option completion.
|
||||||
* Add chown --from and --reference value completions.
|
* Add chown --from and --reference value completions.
|
||||||
* Add chgrp --reference value completion.
|
* Add chgrp --reference value completion.
|
||||||
|
* Do not assume all --foo= options take filenames in generic long option
|
||||||
|
completion, assume only that --*file*= does, and that --*dir*= takes dirs.
|
||||||
|
|
||||||
[ Todd Zullinger ]
|
[ Todd Zullinger ]
|
||||||
* Make yum complete on filenames after install, deplist, update and upgrade
|
* Make yum complete on filenames after install, deplist, update and upgrade
|
||||||
|
@ -4300,7 +4300,14 @@ _longopt()
|
|||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
if _split_longopt; then
|
if _split_longopt; then
|
||||||
_filedir
|
case "$prev" in
|
||||||
|
*[Dd][Ii][Rr]*)
|
||||||
|
_filedir -d
|
||||||
|
;;
|
||||||
|
*[Ff][Ii][Ll][Ee]*)
|
||||||
|
_filedir
|
||||||
|
;;
|
||||||
|
esac
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user