about summary refs log tree commit diff
path: root/Functions/Completion/__dd
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Completion/__dd')
-rw-r--r--Functions/Completion/__dd13
1 files changed, 13 insertions, 0 deletions
diff --git a/Functions/Completion/__dd b/Functions/Completion/__dd
new file mode 100644
index 000000000..c0e04de75
--- /dev/null
+++ b/Functions/Completion/__dd
@@ -0,0 +1,13 @@
+#function dd
+
+if [[ -iprefix conv= ]]; then
+  # If there's a comma present, ignore up to the last one.  The
+  # test alone will have that effect.
+  [[ -string , ]]
+  complist -S, -q \
+  -k '(ascii ebcdic ibm block unblock lcase ucase swab noerror sync)'
+elif [[ -iprefix 'if=' || -iprefix 'of=' ]]; then
+  __files
+else
+  complist -S '=' -k '(if of ibs obs bs cbs skip files seek count conv)'
+fi