Do file completion after gendiff output redirection.
Common use case is "gendiff DIR EXTENSION > FILE".
This commit is contained in:
parent
c3a4f83bfd
commit
d066ace4cb
3
CHANGES
3
CHANGES
@ -1,5 +1,8 @@
|
||||
bash-completion (2.x)
|
||||
|
||||
[ Ville Skyttä ]
|
||||
* Improve gendiff completion.
|
||||
|
||||
-- David Paleino <d.paleino@gmail.com> Sun, 06 Feb 2011 21:46:37 +0100
|
||||
|
||||
bash-completion (1.3)
|
||||
|
@ -294,9 +294,13 @@ have gendiff &&
|
||||
_gendiff()
|
||||
{
|
||||
COMPREPLY=()
|
||||
local cur cword
|
||||
_get_comp_words_by_ref cur cword
|
||||
[[ $cword != 1 ]] || _filedir -d
|
||||
local cur prev cword
|
||||
_get_comp_words_by_ref cur prev cword
|
||||
if [[ $cword -eq 1 ]]; then
|
||||
_filedir -d
|
||||
elif [[ $prev == *\> ]]; then
|
||||
_filedir
|
||||
fi
|
||||
} &&
|
||||
complete -F _gendiff gendiff
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user