mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 13:01:28 +02:00
44 lines
1.2 KiB
Text
44 lines
1.2 KiB
Text
#compdef patch
|
|
|
|
local comp_p='compadd "$expl[@]" -S0 -r "1-9" - ""'
|
|
|
|
_arguments -s \
|
|
'(--strip)-p+:number:'"{$comp_p}" \
|
|
'(--fuzz)-F+:lines:' \
|
|
'(--context)-c' \
|
|
'(--ed)-e' \
|
|
'(--force)-f' \
|
|
'(--batch)-t' \
|
|
'(--ignore-whitespace)-l' \
|
|
'(--normal)-n' \
|
|
'(--forward)-N' \
|
|
'(--reverse)-R' \
|
|
'(--silent --quiet)-s' \
|
|
'(--skip)-S' \
|
|
'(--unified)-u' \
|
|
'(--version)-v' \
|
|
-{E,Z,T} \
|
|
'-i+:patch file:_files' \
|
|
'(--output)-o+:output file:_files' \
|
|
'(--reject-file)-r+:reject file:_files' \
|
|
'(--ifdef)-D+:name:' \
|
|
'(--version-control)-V+:version control style:(simple numbered existing)' \
|
|
'(--prefix)-B+:backup path prefix:' \
|
|
'(--suffix)-b+:backup extension:' \
|
|
'-Y+:backup basename prefix:_files' \
|
|
'-z+:backup file suffix:(.bak)' \
|
|
'-g+:NUM:' \
|
|
'(--directory)-d+:chdir to:_files -/' \
|
|
':original file:_files' \
|
|
':patch file:_files' \
|
|
-- \
|
|
'*strip=NUM*:number:'"{$comp_p}" \
|
|
'*get=NUM*:get files from RCS etc:' \
|
|
'*=LINES*:lines:' \
|
|
'*=PATCHFILE*:patch file:_files' \
|
|
'*=FILE*:file:_files' \
|
|
'*=NAME*:name:' \
|
|
'*=WORD*:quoting style:(literal shell shell-always c escape)' \
|
|
'*=STYLE*:version control style:(simple numbered existing)' \
|
|
'*=SUFFIX*:backup file suffix:(.bak)' \
|
|
'*=DIR*:chdir to:_files -/'
|