Merge pull request #285 from albers/completion-overlay2.size

Add bash completion for `dockerd --storage-opt overlay2.size`
This commit is contained in:
Victor Vieux 2017-07-04 16:41:35 +02:00 committed by GitHub
commit d47bbb8358
1 changed files with 8 additions and 2 deletions

View File

@ -2069,7 +2069,7 @@ _docker_daemon() {
return
;;
--storage-driver|-s)
COMPREPLY=( $( compgen -W "aufs btrfs devicemapper overlay overlay2 vfs zfs" -- "$(echo $cur | tr '[:upper:]' '[:lower:]')" ) )
COMPREPLY=( $( compgen -W "aufs btrfs devicemapper overlay overlay2 vfs zfs" -- "$(echo $cur | tr '[:upper:]' '[:lower:]')" ) )
return
;;
--storage-opt)
@ -2094,11 +2094,14 @@ _docker_daemon() {
dm.use_deferred_deletion
dm.use_deferred_removal
"
local overlay2_options="overlay2.size"
local zfs_options="zfs.fsname"
local all_options="$btrfs_options $devicemapper_options $overlay2_options $zfs_options"
case $(__docker_value_of_option '--storage-driver|-s') in
'')
COMPREPLY=( $( compgen -W "$btrfs_options $devicemapper_options $zfs_options" -S = -- "$cur" ) )
COMPREPLY=( $( compgen -W "$all_options" -S = -- "$cur" ) )
;;
btrfs)
COMPREPLY=( $( compgen -W "$btrfs_options" -S = -- "$cur" ) )
@ -2106,6 +2109,9 @@ _docker_daemon() {
devicemapper)
COMPREPLY=( $( compgen -W "$devicemapper_options" -S = -- "$cur" ) )
;;
overlay2)
COMPREPLY=( $( compgen -W "$overlay2_options" -S = -- "$cur" ) )
;;
zfs)
COMPREPLY=( $( compgen -W "$zfs_options" -S = -- "$cur" ) )
;;