diff options
author | Oliver Kiddle <opk@zsh.org> | 2016-08-19 19:06:37 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2016-08-19 19:06:37 +0200 |
commit | 4200466217cb5873061847b069edac959e8027e0 (patch) | |
tree | 13839c0ce9b1d00ace07050e58c1e5162bd14b26 /Completion/Solaris/Command/_beadm | |
parent | 580698bc7136454941dd6bbc2ca70f240fabc6b7 (diff) | |
download | zsh-4200466217cb5873061847b069edac959e8027e0.tar.gz zsh-4200466217cb5873061847b069edac959e8027e0.tar.xz zsh-4200466217cb5873061847b069edac959e8027e0.zip |
39071: update completion functions for changes in Solaris 11.3
Diffstat (limited to 'Completion/Solaris/Command/_beadm')
-rw-r--r-- | Completion/Solaris/Command/_beadm | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Completion/Solaris/Command/_beadm b/Completion/Solaris/Command/_beadm index 8422653d8..cdb324e87 100644 --- a/Completion/Solaris/Command/_beadm +++ b/Completion/Solaris/Command/_beadm @@ -1,9 +1,10 @@ #compdef beadm -local cmd expl args +local cmd expl args cmds if (( CURRENT == 2 )); then - _wanted subcommands expl 'subcommand' compadd \ + [[ $OSTYPE = solaris* ]] && cmds=( set-policy ) + _wanted subcommands expl 'subcommand' compadd $cmds \ activate create destroy list mount rename unmount return fi @@ -24,15 +25,16 @@ case $cmd in '*-o[property]:zfs property' '-p[create new BE in specified zfs pool]:zfs pool:_zfs_pool' ) - _arguments -A "-*" $args \ + _arguments -A "-*" -s $args \ '-e[base BE]:BE name or snapshot:_be_name -t all' \ ':new BE name:' ;; destroy) [[ $OSTYPE = solaris* ]] && args=( '-f[unmount BE if necessary]' + '(:)-O[destroy all orphaned boot environments]' ) - _arguments -A "-*" \ + _arguments -A "-*" $args \ "-F[don't prompt for verification]" \ ':BE or BE snapshot:_be_name' ;; @@ -42,14 +44,16 @@ case $cmd in elif [[ $OSTYPE = freebsd* ]]; then args=( '-D[display space usage of boot environment]' ) fi - _arguments -A "-*" \ + _arguments -A "-*" -s $args \ '-a[list subordinate filesystems and snapshots]' \ '-s[list snapshots]' \ '-H[parseable format]' \ ':boot environment:_be_name' ;; mount) - _arguments -A "-*" \ + [[ $OSTYPE = solaris* ]] && + args=( '-b[mount associated boot pool dataset]' ) + _arguments -A "-*" $args \ ':BE name:_be_name' \ ':mountpoint:_path_files -/' ;; @@ -58,6 +62,11 @@ case $cmd in ':existing boot environment name:_be_name' \ ':new boot environment:' ;; + set-policy) + _arguments -A "-*" \ + '*-n[specify policy]:policy:(static -static noevict -noevict)' \ + '*:BE name:_be_name' + ;; u(n|)mount) _arguments -A "-*" \ '-f[force unmount]' \ |