about summary refs log tree commit diff
path: root/Completion/User/_dd
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_dd')
-rw-r--r--Completion/User/_dd17
1 files changed, 13 insertions, 4 deletions
diff --git a/Completion/User/_dd b/Completion/User/_dd
index e57074520..9bcdc876d 100644
--- a/Completion/User/_dd
+++ b/Completion/User/_dd
@@ -1,12 +1,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 '*,'
-  compadd -qS, -q ascii ebcdic ibm block unblock lcase ucase swab noerror sync
-elif compset -P 1 '[io]f\='; then
-  _files
+  _description 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
-  compadd -S '=' if of ibs obs bs cbs skip files seek count conv
+  _description expl option
+  compadd "$expl[@]" -S '=' if of ibs obs bs cbs skip files seek count conv
 fi