about summary refs log tree commit diff
path: root/Completion/User/_patch
blob: 6be2afd624cdcc454f34a1a1d567ac90d1e77514 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#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 -/'