about summary refs log tree commit diff
path: root/Completion/Unix/Command/_dd
blob: 64b8275e82c4707fafc380e7fdb1db2ac63f68a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#compdef dd

local opts

opts=(
  'if[specify input file]:input file:_tilde_files'
  'of[specify output file]:output file:_tilde_files'
  'ibs[input block size]:block size (bytes)'
  'obs[output block size]:block size (bytes)'
  'bs[block size]:block size (bytes)'
  'cbs[conversion buffer size]:buffer size (bytes)'
  'skip[input blocks initially skipped]:blocks'
  'seek[output blocks initially skipped]:blocks'
  'files[specify number of input files to copy and concatenate]:number of files'
  'count[number of input blocks to copy]:blocks'
  'conv[specify conversions to apply]:conversion:_values -s , "conversion" ascii ebcdic ibm block unblock lcase ucase swab noerror sync'
)

[[ "$PREFIX$SUFFIX" != *\=* ]] &&
    opts=( "${(@)opts:#(${(j:|:)~words[2,-1]%%\=*})\[*}" )

_values -S '=' 'option' "$opts[@]"