Use _split_longopt() in rsync.
This commit is contained in:
parent
92f790d345
commit
ea90dc1a86
@ -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 \
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user