Complete filenames after commands in rrdtool (Debian: #577933)

This commit is contained in:
David Paleino 2011-04-27 13:45:03 +02:00
parent e35eabb791
commit 7b2c2ebf9b
2 changed files with 7 additions and 2 deletions

View File

@ -31,6 +31,7 @@ bash-completion (2.x)
* Fix __get_cword_at_cursor_by_ref: check for $index when completing
with a cword+1 argument already present (Debian: #622383)
* Remove --unpack-level from lintian options (Debian: #623680)
* Complete filenames after commands in rrdtool (Debian: #577933)
[ Freddy Vulto ]
* Improve __reassemble_comp_words_by_ref() to not create words of

View File

@ -7,8 +7,12 @@ _rrdtool ()
local cur prev words cword
_init_completion || return
COMPREPLY=( $( compgen -W 'create update updatev graph dump restore last \
lastupdate first info fetch tune resize xport' -- "$cur" ) )
if [ ${#words[@]} -eq 2 ]; then
COMPREPLY=( $( compgen -W 'create update updatev graph dump restore \
last lastupdate first info fetch tune resize xport' -- "$cur" ) )
else
_filedir rrd
fi
} &&
complete -F _rrdtool rrdtool