Use _split_longopt() in rsync.
This commit is contained in:
parent
92f790d345
commit
ea90dc1a86
@ -5,12 +5,13 @@ have rsync || return
|
|||||||
_rsync()
|
_rsync()
|
||||||
{
|
{
|
||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
_init_completion -n : || return
|
_init_completion -n := || return
|
||||||
|
|
||||||
# TODO: _split_longopt
|
|
||||||
|
|
||||||
_expand || return 0
|
_expand || return 0
|
||||||
|
|
||||||
|
local split=false
|
||||||
|
_split_longopt && split=true
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
--config|--password-file|--include-from|--exclude-from|--files-from|\
|
--config|--password-file|--include-from|--exclude-from|--files-from|\
|
||||||
--log-file|--write-batch|--only-write-batch|--read-batch)
|
--log-file|--write-batch|--only-write-batch|--read-batch)
|
||||||
@ -36,6 +37,8 @@ _rsync()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
$split && return 0
|
||||||
|
|
||||||
case $cur in
|
case $cur in
|
||||||
-*)
|
-*)
|
||||||
COMPREPLY=( $( compgen -W '--verbose --quiet --no-motd --checksum \
|
COMPREPLY=( $( compgen -W '--verbose --quiet --no-motd --checksum \
|
||||||
|
@ -12,8 +12,14 @@ setup
|
|||||||
|
|
||||||
|
|
||||||
assert_complete_any "rsync "
|
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
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user