37 lines
964 B
Plaintext
37 lines
964 B
Plaintext
#compdef sync
|
|
|
|
autoload -U is-at-least
|
|
|
|
_sync() {
|
|
typeset -A opt_args
|
|
typeset -a _arguments_options
|
|
local ret=1
|
|
|
|
if is-at-least 5.2; then
|
|
_arguments_options=(-s -S -C)
|
|
else
|
|
_arguments_options=(-s -C)
|
|
fi
|
|
|
|
local context curcontext="$curcontext" state line
|
|
_arguments "${_arguments_options[@]}" \
|
|
'(-f --file-system)-d[sync only file data, no unneeded metadata]' \
|
|
'(-f --file-system)--data[sync only file data, no unneeded metadata]' \
|
|
'-f[sync the file systems that contain the files]' \
|
|
'--file-system[sync the file systems that contain the files]' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
'-V[Print version]' \
|
|
'--version[Print version]' \
|
|
'*::FILE -- If one or more files are specified, sync only them, or their containing file systems.:' \
|
|
&& ret=0
|
|
}
|
|
|
|
(( $+functions[_sync_commands] )) ||
|
|
_sync_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'sync commands' commands "$@"
|
|
}
|
|
|
|
_sync "$@"
|