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

local expl

if compset -P 1 'conv\='; then
  # If there's a comma present, ignore up to the last one.  The
  # test alone will have that effect.
  compset -p '*,'
  _wanted values expl conversion &&
      compadd "$expl[@]" -qS, -q \
              ascii ebcdic ibm block unblock lcase ucase swab noerror sync
elif compset -P 1 'if\='; then
  _description expl 'input file'
  _files "$expl[@]"
elif compset -P 1 'of\='; then
  _description expl 'output file'
  _files "$expl[@]"
else
  _wanted values expl option &&
      compadd "$expl[@]" -S '=' if of ibs obs bs cbs skip files seek count conv
fi