From 8b35dd34233761c2b238858eae7b458a6d017672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 13 Sep 2016 19:37:45 +0300 Subject: [PATCH] dd: Sync completions with coreutils 8.24 --- completions/dd | 19 ++++++++++++++++--- test/lib/completions/dd.exp | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/completions/dd b/completions/dd index c91a39392c2..daaebbe1591 100644 --- a/completions/dd +++ b/completions/dd @@ -14,7 +14,20 @@ _dd() conv=*) cur=${cur#*=} COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock lcase - notrunc ucase swab noerror sync' -- "$cur" ) ) + ucase sparse swab sync excl nocreat notrunc noerror fdatasync + fsync' -- "$cur" ) ) + return + ;; + iflag=*|oflag=*) + cur=${cur#*=} + COMPREPLY=( $( compgen -W 'append direct directory dsync sync + fullblock nonblock noatime nocache noctty nofollow count_bytes + skip_bytes seek_bytes' -- "$cur" ) ) + return + ;; + status=*) + cur=${cur#*=} + COMPREPLY=( $( compgen -W 'none noxfer progress' -- "$cur" ) ) return ;; esac @@ -22,8 +35,8 @@ _dd() _expand || return COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) \ - $( compgen -W 'bs cbs conv count ibs if obs of seek skip' \ - -S '=' -- "$cur" ) ) + $( compgen -W 'bs cbs conv count ibs if iflag obs of oflag + seek skip status' -S '=' -- "$cur" ) ) } && complete -F _dd -o nospace dd diff --git a/test/lib/completions/dd.exp b/test/lib/completions/dd.exp index e02e037c1ee..4946e54d528 100644 --- a/test/lib/completions/dd.exp +++ b/test/lib/completions/dd.exp @@ -18,7 +18,7 @@ sync_after_int set test "option should be suffixed with =" -set cmd "dd if" +set cmd "dd bs" send "$cmd\t" expect -ex "$cmd" expect {