diff options
author | Danek Duvall <duvall@comfychair.org> | 2014-01-02 11:52:24 -0800 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-01-02 22:26:04 +0000 |
commit | ef2eaf1f787370356159bfb402a057d88b934ceb (patch) | |
tree | 27d4ce143fa38125c327c16587affa53d24c1b6b /Completion/Unix/Command | |
parent | 60372fbda67ba0f61bd0e706f599c1f6e5255f98 (diff) | |
download | zsh-ef2eaf1f787370356159bfb402a057d88b934ceb.tar.gz zsh-ef2eaf1f787370356159bfb402a057d88b934ceb.tar.xz zsh-ef2eaf1f787370356159bfb402a057d88b934ceb.zip |
32261: completion updates for Solaris 11, Update 1
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_zfs | 139 | ||||
-rw-r--r-- | Completion/Unix/Command/_zpool | 21 |
2 files changed, 151 insertions, 9 deletions
diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs index 4cc24a59f..a9707ce36 100644 --- a/Completion/Unix/Command/_zfs +++ b/Completion/Unix/Command/_zfs @@ -1,10 +1,13 @@ #compdef zfs -# Synced with the S11U1 build 20 man page +# Synced with the S11U1 man page _zfs() { local context state line expl typeset -A opt_args local -a subcmds rw_properties rw_propnames ro_properties create_properties + local -a share_nfs_ro_properties share_nfs_rw_properties + local -a share_smb_ro_properties share_nfs_rw_properties + local -a share_ro_properties share_rw_properties local -a difffields delegatable_perms subcmds=( @@ -15,6 +18,115 @@ _zfs() { "diff" "key" "help" ) + share_nfs_ro_properties=( + "share.nfs.all" + ) + + share_nfs_rw_properties=( + "share.nfs:value:(on off)" + "share.nfs.aclok:value:(on off)" + "share.nfs.acflfab:value:(on off)" + "share.nfs.anon:uid:" + "share.nfs.charset.euc-cn:access-list:" + "share.nfs.charset.euc-jpms:access-list:" + "share.nfs.charset.euc-kr:access-list:" + "share.nfs.charset.euc-tw:access-list:" + "share.nfs.charset.iso8859-1:access-list:" + "share.nfs.charset.iso8859-2:access-list:" + "share.nfs.charset.iso8859-5:access-list:" + "share.nfs.charset.iso8859-6:access-list:" + "share.nfs.charset.iso8859-7:access-list:" + "share.nfs.charset.iso8859-8:access-list:" + "share.nfs.charset.iso8859-9:access-list:" + "share.nfs.charset.iso8859-13:access-list:" + "share.nfs.charset.iso8859-15:access-list:" + "share.nfs.charset.koi8-r:access-list:" + "share.nfs.index:file:_files" + "share.nfs.log:nfslog.conf tag:" + "share.nfs.nosub:value:(on off)" + "share.nfs.nosuid:value:(on off)" + "share.nfs.public:value:(on off)" + "share.nfs.sec:security-mode-list:" + "share.nfs.sec.default.none:access-list:" + "share.nfs.sec.default.ro:access-list:" + "share.nfs.sec.default.root:access-list:" + "share.nfs.sec.default.root_mapping:uid:" + "share.nfs.sec.default.rw:access-list:" + "share.nfs.sec.default.window:seconds" + "share.nfs.sec.dh.none:access-list:" + "share.nfs.sec.dh.ro:access-list:" + "share.nfs.sec.dh.root:access-list:" + "share.nfs.sec.dh.root_mapping:uid:" + "share.nfs.sec.dh.rw:access-list:" + "share.nfs.sec.dh.window:seconds" + "share.nfs.sec.krb5.none:access-list:" + "share.nfs.sec.krb5.ro:access-list:" + "share.nfs.sec.krb5.root:access-list:" + "share.nfs.sec.krb5.root_mapping:uid:" + "share.nfs.sec.krb5.rw:access-list:" + "share.nfs.sec.krb5.window:seconds" + "share.nfs.sec.krb5i.none:access-list:" + "share.nfs.sec.krb5i.ro:access-list:" + "share.nfs.sec.krb5i.root:access-list:" + "share.nfs.sec.krb5i.root_mapping:uid:" + "share.nfs.sec.krb5i.rw:access-list:" + "share.nfs.sec.krb5i.window:seconds" + "share.nfs.sec.krb5p.none:access-list:" + "share.nfs.sec.krb5p.ro:access-list:" + "share.nfs.sec.krb5p.root:access-list:" + "share.nfs.sec.krb5p.root_mapping:uid:" + "share.nfs.sec.krb5p.rw:access-list:" + "share.nfs.sec.krb5p.window:seconds" + "share.nfs.sec.none.none:access-list:" + "share.nfs.sec.none.ro:access-list:" + "share.nfs.sec.none.root:access-list:" + "share.nfs.sec.none.root_mapping:uid:" + "share.nfs.sec.none.rw:access-list:" + "share.nfs.sec.none.window:seconds" + "share.nfs.sec.sys.none:access-list:" + "share.nfs.sec.sys.ro:access-list:" + "share.nfs.sec.sys.root:access-list:" + "share.nfs.sec.sys.root_mapping:uid:" + "share.nfs.sec.sys.rw:access-list:" + "share.nfs.sec.sys.window:seconds" + ) + + share_smb_ro_properties=( + "share.smb.all" + ) + + share_smb_rw_properties=( + "share.smb:value:(on off)" + "share.smb.ad-container" + "share.smb.abe" + "share.smb.csc:value:(disabled manual auto vdo)" + "share.smb.catia:value:(on off)" + "share.smb.dfsroot:value:(on off)" + "share.smb.guestok:value:(on off)" + "share.smb.ro:access-list:" + "share.smb.rw:access-list:" + "share.smb.none:access-list:" + ) + + share_ro_properties=( + "share.all" + "share.fs" + "share.name" + "share.point" + "share.protocols" + "share.state" + $share_nfs_ro_properties + $share_smb_ro_properties + ) + + share_rw_properties=( + "share.desc:description:" + "share.noauto:value:(on off)" + "share.path:path:" + $share_nfs_rw_properties + $share_smb_rw_properties + ) + # TODO: userused@ and groupused@ could have more extensive handling ro_properties=( "name" "type" "creation" "used" "available" "referenced" @@ -22,6 +134,7 @@ _zfs() { "usedbydataset" "usedbyrefreservation" "usedbysnapshots" "defer_destroy" "userused@" "userrefs" "groupused@" "keychangedate" "keystatus" "rekeydate" + $share_ro_properties ) # TODO: Be cleverer about what values can be set. Is there any way to @@ -57,8 +170,6 @@ _zfs() { "setuid:value:(on off)" "shadow:value:" # TODO: complete URI|none "share:share properties:" - "sharenfs:value:(on off)" - "sharesmb:value:(on off)" "snapdir:value:(hidden visible)" "sync:value:(standard always disabled)" "userquota@:value:" # TODO: complete user=size|none @@ -67,6 +178,7 @@ _zfs() { "vscan:value:(on off)" "xattr:value:(on off)" "zoned:value:(on off)" + $share_rw_properties ) create_properties=( @@ -246,7 +358,14 @@ _zfs() { - set1 \ '-a[Share all available ZFS filesystems]' \ - set2 \ - ':filesystem:_zfs_dataset -t fs' + '-r[Share filesystems recursively]' \ + ':filesystem:_zfs_dataset -t fs' \ + - set3 \ + '*-o[Create a share with these properties]:property:_values -w "share properties" $share_rw_properties' \ + '-u[Create a share without sharing it]' \ + ':filesystem:_zfs_dataset -t fs' \ + - set4 \ + ':filesystem:_zfs_dataset -t fs -t mtpt -t share' ;; ("unshare") @@ -254,7 +373,10 @@ _zfs() { - set1 \ '-a[Unshare all shared ZFS filesystems]' \ - set2 \ - ':filesystem:_zfs_dataset -t fs -t mtpt' + '-r[Unshare filesystems recursively]' \ + ':filesystem:_zfs_dataset -t fs' \ + - set3 \ + ':filesystem:_zfs_dataset -t fs -t mtpt -t share' ;; ("send") @@ -410,7 +532,12 @@ _zfs() { ;; ("help") - compadd property $subcmds $ro_properties ${rw_properties%%:*} + _arguments -A "-*" \ + - set1 \ + ':command:($subcmds $delegatable_perms $ro_properties ${rw_properties%%:*} properties)' \ + - set2 \ + '-l[Display property information]' \ + ': :(properties)' ;; (*) diff --git a/Completion/Unix/Command/_zpool b/Completion/Unix/Command/_zpool index 0af2ab32d..0f18eefb5 100644 --- a/Completion/Unix/Command/_zpool +++ b/Completion/Unix/Command/_zpool @@ -1,5 +1,5 @@ #compdef zpool -# Synced with the S11U1 build 19 man page +# Synced with the S11U1 man page _zpool() { local context state line expl @@ -8,7 +8,7 @@ _zpool() { subcmds=( create destroy add remove list iostat status online offline clear attach detach replace scrub import export - upgrade history get set split + upgrade history get set split help ) versions=( @@ -35,7 +35,9 @@ _zpool() { "dedupditto[Threshold for number of copies]:value:" "delegation[Delegated administration]:value:(on off)" "failmode[Failure-mode behavior]:value:(wait continue panic)" + "listshares[Show shares in 'zfs list']:value:(on off)" "listsnaps[Show snapshots in 'zfs list']:value:(on off)" + "readonly[Controls whether the pool can be modified]:value:(on off)" "version[Pool version]:version:($versions)" ) @@ -97,9 +99,19 @@ _zpool() { fi case $service in + (help) + _arguments -A "-*" \ + - set1 \ + ':command/property:($subcmds ${fields%%\[*} properties)' \ + - set2 \ + '-l[Display property information]' \ + ': :(properties)' + ;; + (clear) _arguments -A "-*" \ '-F[Discard transactions to allow pool opening]' \ + '-f[Ignore fmadm acquit and fmadm repair failures]' \ '-n[With -F, check if discarding transactions would work]' \ ':pool name:_zfs_pool' \ '*:virtual device:_files' @@ -216,10 +228,13 @@ _zpool() { _arguments -A "-*" \ '-D[Destroyed pools]' \ '(-d)*-c[Use cache file]:cache file:_files' \ - '(-c)*-d[Search for devices or files in directory]:directory:_files -/' \ + '(-c,-D)*-d[Search for devices or files in directory]:directory:_files -/' \ + '-F[Recovery mode: discard transactions if required]' \ '-f[Force import]' \ '-l[Display configuration in /dev/chassis location form]' \ '-m[Ignore missing log devices]' \ + '-N[Import pool without mounting any filesystems]' \ + '-n[With -F; do not perform input]' \ '-R[Alternate root]:alternate root:_files -/' \ '-o[Set pool or dataset property]:property:_values -s , "property" $create_properties_dataset $rw_props' \ - set1 \ |