Use _split_longopt() in rsync.

This commit is contained in:
Ville Skyttä 2011-04-24 18:50:40 +03:00
parent 92f790d345
commit ea90dc1a86
2 changed files with 12 additions and 3 deletions

View File

@ -5,12 +5,13 @@ have rsync || return
_rsync()
{
local cur prev words cword
_init_completion -n : || return
# TODO: _split_longopt
_init_completion -n := || return
_expand || return 0
local split=false
_split_longopt && split=true
case $prev in
--config|--password-file|--include-from|--exclude-from|--files-from|\
--log-file|--write-batch|--only-write-batch|--read-batch)
@ -36,6 +37,8 @@ _rsync()
;;
esac
$split && return 0
case $cur in
-*)
COMPREPLY=( $( compgen -W '--verbose --quiet --no-motd --checksum \

View File

@ -12,8 +12,14 @@ setup
assert_complete_any "rsync "
sync_after_int
assert_complete "rsh ssh" "rsync --rsh "
sync_after_int
assert_complete "rsh ssh" "rsync --rsh="
sync_after_int