Skip to content

Commit

Permalink
dd: Sync completions with coreutils 8.24
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Sep 13, 2016
1 parent 78b0543 commit 8b35dd3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions completions/dd
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,29 @@ _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

_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

Expand Down
2 changes: 1 addition & 1 deletion test/lib/completions/dd.exp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8b35dd3

Please sign in to comment.