7021213 zsh completion for ipadm build-171
authorDanek Duvall <danek.duvall@oracle.com>
Wed, 20 Jul 2011 16:57:37 -0700
changeset 429 02007d525e89
parent 428 c1840af5fbf5
child 430 51025776a91e
7021213 zsh completion for ipadm 7021214 zsh completion for fmadm 7023237 zsh completion for dtrace options 7023488 Fix TODO in _svcs_fmri (Can't remove default when there are other instances.)
components/zsh/Completion/Solaris/Command/_dladm
components/zsh/Completion/Solaris/Command/_dtrace
components/zsh/Completion/Solaris/Command/_flowadm
components/zsh/Completion/Solaris/Command/_fmadm
components/zsh/Completion/Solaris/Command/_ipadm
components/zsh/Completion/Solaris/Command/_pkg5
components/zsh/Completion/Solaris/Command/_zlogin
components/zsh/Completion/Solaris/Command/_zoneadm
components/zsh/Completion/Solaris/Type/_svcs_fmri
components/zsh/Completion/Solaris/Type/_zones
components/zsh/Completion/Unix/Command/_zfs
components/zsh/Completion/Unix/Command/_zpool
components/zsh/Completion/Unix/Type/_zfs_dataset
components/zsh/Completion/Unix/Type/_zfs_keysource_props
components/zsh/zsh.p5m
--- a/components/zsh/Completion/Solaris/Command/_dladm	Wed Jul 20 13:54:22 2011 -0700
+++ b/components/zsh/Completion/Solaris/Command/_dladm	Wed Jul 20 16:57:37 2011 -0700
@@ -1,5 +1,5 @@
 #compdef dladm
-# Synced with the Nevada build 131 man page
+# Synced with the Nevada build 171 man page
 
 _dladm_links() {
 	compadd "[email protected]" - $(dladm show-link -p -o link)
@@ -37,11 +37,6 @@
 	compadd "[email protected]" - $(dladm show-ether -p -o link)
 }
 
-_dladm_linkprops() {
-	# TODO: complete property values, when available
-	compadd "[email protected]" - $(dladm show-linkprop -c -o property)
-}
-
 _dladm_vnics() {
 	compadd "[email protected]" - $(dladm show-vnic -p -o link)
 }
@@ -58,24 +53,35 @@
 	compadd "[email protected]" - $(dladm show-iptun -p -o link)
 }
 
+_dladm_parts() {
+	compadd "[email protected]" - $(dladm show-part -p -o link)
+}
+
+_dladm_iblinks() {
+	compadd "[email protected]" - $(dladm show-ib -p -o link)
+}
+
 _dladm() {
 	local context state line expl
 	typeset -A opt_args
-	local -a subcmds rw_properties rw_propnames ro_properties
-	local -a link_properties link_stats_properties
+	local -a subcmds
+	local -a linkprops linkprops_general linkprops_nonvlanvnic linkprops_wifi
+	local -a linkprops_ether linkprops_ib linkprops_iptun
+	local -a link_properties link_stats_properties vnic_properties
 	local -a aggr_properties aggr_lacp_properties aggr_ext_properties
 	local -a vlan_properties wifi_properties wifi_connect_properties
 	local -a ether_properties linkprop_properties secobj_properties
 	local -a bridge_properties bridge_stats_properties bridge_link_properties
-	local -a bridge_link_stats_properties bridge_fwd_properties bridge_fwd_properties
-	local -a iptun_properties
+	local -a bridge_link_stats_properties bridge_fwd_properties
+	local -a bridge_fwd_properties bridge_trill_properties
+	local -a iptun_properties tunnel_values part_properties ib_properties
 
 	# TODO: some subcommands can take multiple comma-separated targets
 	# TODO: some option sets may be different based on other commandline flags
 	# TODO: some subcommands may take different arguments based on options
 
 	subcmds=(
-		"show-ether" "show-usage"
+		"show-ether" "show-ib" "show-usage"
 		{"rename","show"}"-link"
 		{"add","create","delete","modify","remove","show"}"-aggr"
 		{"connect","disconnect","scan","show"}"-wifi"
@@ -87,6 +93,7 @@
 		{"create","delete","show"}"-etherstub"
 		{"create","modify","delete","add","remove","show"}"-bridge"
 		{"create","modify","delete","show"}"-iptun"
+		{"create","delete","show"}"-part"
 	)
 
 	if [[ $service == "dladm" ]]; then
@@ -102,7 +109,7 @@
 		curcontext="${curcontext%:*}=$service:"
 	fi
 
-	link_properties=( "link" "class" "mtu" "state" "over" )
+	link_properties=( "link" "zone" "class" "mtu" "state" "over" )
 	link_stats_properties=( "link" "ipackets" "rbytes" "ierrors" "opackets" "obytes" "oerrors" )
 
 	aggr_properties=( "link" "policy" "addrpolicy" "lacpactivity" "lacptimer" "flags" )
@@ -132,13 +139,98 @@
 	bridge_fwd_properties=( "dest" "age" "flags" "output" )
 	bridge_trill_properties=( "nick" "flags" "link" "nexthop" )
 
-	iptun_properties=( "link" "type" "flags" )
+	iptun_properties=( "link" "type" "flags" "local" "remote" )
+	tunnel_values=( "local:address/host: " "remote:address/host: " )
+
+	part_properties=( "link" "pkey" "over" "state" "flags" )
+
+	ib_properties=( "link" "hcaguid" "portguid" "port" "state" "pkeys" )
+
+	linkprops_general=(
+		"autopush:streams modules:"
+		"cpus:processors:"
+		"cpus-effective"
+		"mac-address:MAC address:"
+		"maxbw:bandwith:"
+		"pool:pools:"
+		"pool-effective"
+		"priority:priority:(high medium low)"
+		"rxringsavail"
+		"rxrings:value:"
+		"rxhwclntavail"
+		"txringsavail"
+		"txrings:value:"
+		"txhwclntavail"
+		"forward:value:(0 1)"
+		"stp_priority:value:"
+		"stp_cost:value:"
+		"stp_edge:value:(0 1)"
+		"stp_p2p:value:(true false auto)"
+		"stp_mcheck:value:(0 1)"
+		"protection:value:(mac-nospoof ip-nospoof dhcp-nospoof restricted)"
+		"zone:value:_zones"
+	)
+	linkprops_nonvlanvnic=(
+		"default_tag:value:"
+		"learn_decay:value:"
+		"learn_limit:value:"
+		"rxfanout:value:"
+		"rxfanout-effective:value:"
+		"stp:value:(0 1)"
+	)
+	linkprops_wifi=(
+		"channel:value:"
+		"powermode:value:(off max fast)"
+		"radio:value:(on off)"
+		"speed:value:"
+	)
+	linkprops_ether=(
+		"duplex"
+		"state"
+		"adv_autoneg_cap"
+		"adv_10gfdx_cap"
+		"adv_1000fdx_cap"
+		"adv_1000hdx_cap"
+		"adv_100fdx_cap"
+		"adv_100hdx_cap"
+		"adv_10fdx_cap"
+		"adv_10hdx_cap"
+		"en_10gfdx_cap:value:(0 1)"
+		"en_1000fdx_cap:value:(0 1)"
+		"en_1000hdx_cap:value:(0 1)"
+		"en_100fdx_cap:value:(0 1)"
+		"en_100hdx_cap:value:(0 1)"
+		"en_10fdx_cap:value:(0 1)"
+		"en_10hdx_cap:value:(0 1)"
+		"flowctrl:value:(auto no rx tx pfc bi)"
+		"flowctrl-effective"
+		"gvrp-timeout:value:"
+		"mtu:value:"
+		"ntcs"
+		"pfcmap:value:"
+		"speed"
+		"tagmode:value:(normal vlanonly)"
+		"vlan-announce:value:(off gvrp)"
+	)
+	linkprops_ib=(
+		"linkmode:value:(cm ud)"
+	)
+	linkprops_iptun=(
+		"hoplimit:value:"
+		"encaplimit:value:"
+	)
+	linkprops=(
+		$linkprops_general $linkprops_wifi $linkprops_ether
+		$linkprops_ib $linkprops_iptun
+	)
 
 	case $service in
 	("show-link")
 		_arguments -A "-*" \
 			'(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \
 			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			- set1 \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $link_properties' \
 			- set2 \
@@ -158,8 +250,12 @@
 	("show-phys")
 		_arguments -A "-*" \
 			'-H[Show hardware resource usage]' \
+			'-L[Display location information]' \
 			'(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \
 			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
+			'-m[Display MAC address information]' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			'(-s --statistics)'{-s,--statistics}'[Display link statistics]' \
 			'(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" link media state speed duplex device' \
@@ -224,6 +320,8 @@
 			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
 			'(-s --statistics)'{-s,--statistics}'[Display link statistics]' \
 			'(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			':aggregate link name:_dladm_links' \
 			- set1 \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $aggr_properties' \
@@ -257,6 +355,8 @@
 			'(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \
 			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $vlan_properties' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			':VLAN link name:_dladm_vlans'
 		;;
 
@@ -292,6 +392,8 @@
 		_arguments -A "-*" \
 			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $wifi_properties' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			':wireless link name:_dladm_wifi_links'
 		;;
 
@@ -300,6 +402,8 @@
 			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
 			'(-x --extended)'{-x,--extended}'[Extended output]' \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $ether_properties' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			':ethernet link name:_dladm_ethers'
 		;;
 
@@ -307,7 +411,7 @@
 		_arguments -A "-*" \
 			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
 			'(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \
-			'(-p --prop)'{-p,--prop}'[Properties]:property:_dladm_linkprops' \
+			'(-p --prop)'{-p,--prop}'[Properties]:property:_values -s , "property" ${(M)linkprops\:#*\:*}' \
 			':link name:_dladm_links'
 		;;
 
@@ -315,7 +419,7 @@
 		_arguments -A "-*" \
 			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
 			'(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \
-			'(-p --prop)'{-p,--prop}'[Properties]:property:_dladm_linkprops' \
+			'(-p --prop)'{-p,--prop}'[Properties]:property:_values -s , "property" ${${(M)linkprops\:#*\:*}%%\:*}' \
 			':link name:_dladm_links'
 		;;
 
@@ -324,7 +428,9 @@
 			'(-P --persistent)'{-P,--persistent}'[Display persistent link properties]' \
 			'(-c --parseable)'{-c,--parseable}'[Parseable output]' \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $linkprop_properties' \
-			'(-p --prop)'{-p,--prop}'[Properties]:property:_dladm_linkprops' \
+			'(-p --prop)'{-p,--prop}'[Properties]:property:_values -s , "property" ${linkprops%%\:*}' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			':link name:_dladm_links'
 		;;
 
@@ -360,7 +466,7 @@
 			'(-l --link)'{-l,--link}'[Component link]:link:_dladm_links' \
 			'(-m --mac-address)'{-m,--mac-address}'[MAC address]:address:(factory random auto vrrp)' \
 			'-v[VLAN ID]:id:' \
-			'(-p --prop)'{-p,--prop}'[Property values]:value:' \
+			'(-p --prop)'{-p,--prop}'[Property values]:value:_values -s , "property" ${(M)linkprops_general\:#*\:*}' \
 			':VNIC name:'
 		;;
 
@@ -379,6 +485,8 @@
 			'(-l --link)'{-l,--link}'[Limit to VNICs on link]:link:_dladm_links' \
 			'(-s --statistics)'{-s,--statistics}'[Display VNIC statistics]' \
 			'(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			':VNIC name:_dladm_vnics'
 		;;
 
@@ -398,6 +506,8 @@
 
 	("show-etherstub")
 		_arguments -A "-*" \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			':etherstub name:_dladm_etherstubs'
 		;;
 
@@ -454,17 +564,17 @@
 
 
 	("show-bridge")
+		# XXX $bridge_stats_properties get added into -o completions for set1
+		# XXX $bridge_link_stats_properties get added into -o completions for set3
 		_arguments -A "-*" \
 			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
 			- set1 \
-			# XXX $bridge_stats_properties get added in!
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_properties' \
 			- set2 \
 			'(-s --statistics)'{-s,--statistics}'[Display statistics]' \
 			'(-i --interval)'{-i,--interval}'[Specify an interval]:seconds' \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_stats_properties' \
 			- set3 \
-			# XXX $bridge_link_stats_properties get added in!
 			'(-l --link)'{-l,--link}'[Display link status or statistics]' \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_link_properties' \
 			- set4 \
@@ -487,8 +597,7 @@
 			'(-t --temporary)'{-t,--temporary}'[Temporary tunnel]' \
 			'(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \
 			'(-T --type)'{-T,--type}'[Tunnel type]:tunnel type:(ipv4 ipv6 6to4)' \
-			'(-s --tunnel-src)'{-s,--tunnel-src}'[Tunnel source]:address/host:' \
-			'(-d --tunnel-dst)'{-d,--tunnel-dst}'[Tunnel dest]:address/host:' \
+			'(-a --address)'{-a,--address}'[Endpoint addresses]:address/host:_values -s , "address/host" $tunnel_values' \
 			':tunnel name:'
 		;;
 
@@ -496,8 +605,7 @@
 		_arguments -A "-*" \
 			'(-t --temporary)'{-t,--temporary}'[Temporary modification]' \
 			'(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \
-			'(-s --tunnel-src)'{-s,--tunnel-src}'[Tunnel source]:address/host:' \
-			'(-d --tunnel-dst)'{-d,--tunnel-dst}'[Tunnel dest]:address/host:' \
+			'(-a --address)'{-a,--address}'[Endpoint addresses]:address/host:_values -s , "address/host" $tunnel_values' \
 			':tunnel name:_dladm_iptuns'
 		;;
 
@@ -513,9 +621,46 @@
 			'(-P --persistent)'{-P,--persistent}'[Display persistent tunnel configuration]' \
 			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
 			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $iptun_properties' \
+			'-Z[Display ZONE column in output]' \
+			'-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \
 			':tunnel name:_dladm_iptuns'
 		;;
 
+	("create-part")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Temporary partition]' \
+			'(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \
+			'(-f --force)'{-f,--force}'[Force partition creation]' \
+			'(-l --link)'{-l,--link}'[IP-over-IB physical link name]:IB link:_dladm_iblinks' \
+			'(-p --prop)'{-p,--prop}'[Set link properties]:link property:_values -s , "property" ${(M)linkprops_nonvlanvnic\:#*\:*} ${(M)linkprops_general\:#*\:*}' \
+			'(-P --pkey)'{-P,--pkey}'[Set parition key]:hex number:' \
+			':partition link name:'
+		;;
+
+	("delete-part")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Temporary deletion]' \
+			'(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \
+			':link name:_dladm_parts'
+		;;
+
+	("show-part")
+		_arguments -A "-*" \
+			'(-P --persistent)'{-P,--persistent}'[Display persistent partition configuration]' \
+			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
+			'(-l --link)'{-l,--link}'[Information for this link]:link name:_dladm_iblinks' \
+			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $part_properties' \
+			':partition link name:_dladm_parts'
+		;;
+
+	("show-ib")
+		_arguments -A "-*" \
+			'(-P --persistent)'{-P,--persistent}'[Display persistent partition configuration]' \
+			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
+			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $ib_properties' \
+			':IB link name:_dladm_iblinks'
+		;;
+
 	(*)
 		_message "unknown dladm subcommand: $service"
 		;;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Solaris/Command/_dtrace	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,41 @@
+#compdef dtrace
+# Synced with Nevada build 160 man pages
+
+_dtrace() {
+	_arguments -s \
+	'-32[generate 32-bit D programs and ELF files]' \
+	'-64[generate 64-bit D programs and ELF files]' \
+	'-a[claim anonymous tracing state]' \
+	'-A[generate driver.conf(4) directives for anonymous tracing]' \
+	'-b[set trace buffer size]' \
+	'-c[run specified command and exit upon its completion]' \
+	'-C[run cpp(1) preprocessor on script files]' \
+	'-D[define symbol when invoking preprocessor]' \
+	'-e[exit after compiling request but prior to enabling probes]' \
+	'-f[enable or list probes matching the specified function name]:function:_dtrace_function' \
+	'-F[coalesce trace output by function]' \
+	'-G[generate an ELF file containing embedded dtrace program]' \
+	'-H[print included files when invoking preprocessor]' \
+	'-h[Generate a header file]' \
+	'-i[enable or list probes matching the specified probe id]' \
+	'-I[add include directory to preprocessor search path]:include dir:_files -/' \
+	'-L[Add directory to search path for DTrace libraries]:lib dir:_files -/' \
+	'-l[list probes matching specified criteria]' \
+	'-m[enable or list probes matching the specified module name]:module:_dtrace_module' \
+	'-n[enable or list probes matching the specified probe name]:name:_dtrace_name' \
+	'-o[set output file]:output file:_files' \
+	'-p[grab specified process-ID and cache its symbol tables]:pid:_pids' \
+	'-P[enable or list probes matching the specified provider name]:provider:_dtrace_provider' \
+	'-q[set quiet mode (only output explicitly traced data)]' \
+	'-s[enable or list probes according to the specified D script]' \
+	'-S[print D compiler intermediate code]' \
+	'-U[undefine symbol when invoking preprocessor]' \
+	'-v[set verbose mode (report program stability attributes)]' \
+	'-V[report DTrace API version]' \
+	'-w[permit destructive actions]' \
+	'-x[enable or modify compiler and tracing options]' \
+	'-X[specify ISO C conformance settings for preprocessor]:ISO C conformance:((a\:"ISO plus K&R extensions (default)" c\:"Strictly conformant ISO C" s\:"K&R C only" t\:"ISO plus K&R extensions"))' \
+	'-Z[permit probe descriptions that match zero probes]'
+}
+
+_dtrace "[email protected]"
--- a/components/zsh/Completion/Solaris/Command/_flowadm	Wed Jul 20 13:54:22 2011 -0700
+++ b/components/zsh/Completion/Solaris/Command/_flowadm	Wed Jul 20 16:57:37 2011 -0700
@@ -1,4 +1,5 @@
 #compdef flowadm
+# Synced with the Nevada build 171 man page
 
 _flowadm() {
 
@@ -21,7 +22,6 @@
 	"set-flowprop"
 	"reset-flowprop"
 	"show-flowprop"
-	"show-usage"
 )
 	
 tr=(
@@ -33,7 +33,6 @@
 )
 
 props=(
-	"priority"
 	"maxbw"
 )
 
@@ -49,27 +48,27 @@
 	curcontext="${curcontext%:*}=$service:"
 fi
 case $service in
+
 	("show-flow")
 	_arguments -A "-*" \
 		'-o[specify field to display]:field:(flow link ipaddr proto port dsfield)' \
 		'-p[parsable output]' \
 		'-P[persistent flow property information]' \
-		'-S[continuously display network utilization by flow]' \
-		'-s[display flow statistics]' \
-		'-i[specify interval (used with -s)]:interval' \
 		- set1 \
 		'-l[display information for link]:link or flow:_net_interfaces' \
 		- set2 \
 		':flow:_flowadm_flow' \
 	;;
+
 	("add-flow")
 	_arguments -A "-*" \
 		'-t[temporary changes - do not persist across reboots]' \
 		'-R[alternate root dir]:alternate root:_files' \
 		'-l[specify link to which flow will be added]:link:_net_interfaces' \
 		'-a[specify attribute]:attribute:(local_ip= remote_ip= transport=$tr local_port= dsfield=)' \
-		'-p[set property value]:property:(maxbw= priority=)' \
+		'-p[set property value]:property:(maxbw=)' \
 	;;
+
 	("remove-flow")
 	_arguments -A "-*" \
 		'-t[temporary changes - do not persist across reboots]' \
@@ -79,40 +78,31 @@
 		- set2 \
 		':flow:_flowadm_flow' \
 	;;
+
 	("set-flowprop")
 	_arguments -A "-*" \
 		'-t[temporary changes - do not persist across reboots]' \
 		'-R[alternate root dir]:alternate root:_files' \
-		'-p[set property value]:property:(maxbw= priority=)' \
+		'-p[set property value]:property:(maxbw=)' \
 		':flow:_flowadm_flow' \
 	;;
+
 	("reset-flowprop")
 	_arguments -A "-*" \
 		'-t[temporary changes - do not persist across reboots]' \
 		'-R[alternate root dir]:alternate root:_files' \
-		'-p[set property value]:property:(maxbw= priority=)' \
+		'-p[set property value]:property:(maxbw=)' \
 		':flow:_flowadm_flow' \
 	;;
+
 	("show-flowprop")
 	_arguments -A "-*" \
 		'-c[parsable output (requires -o)]' \
+		'-l[specify link whose properties will be shown]:link:_net_interfaces' \
 		'-P[persistent flow property information]' \
 		'-p[property to show]:property:_values -s , "property" $props' \
 		':flow:_flowadm_flow' \
 	;;
-	("show-usage")
-	_arguments -A "-*" \
-		'-a[display all historical network usage]' \
-		'-s[start time for data display (YYYY.MM.DD,hh:mm:ss)]' \
-		'-e[end time for data display (YYYY.MM.DD,hh:mm:ss)]' \
-		'-f[Read extended accounting records of network flow usage from file]:file:_files' \
-		':flow:_flowadm_flow' \
-		- set1 \
-		'-F[specifies the format of plotfile (gnuplot is only supported format)]' \
-		'-p[outputs flow usage data to a file of the format specified by the -F option]:plotfile:_files' \
-		- set2 \
-		'-d[display date in the format DD/MM/YYYY]' \
- 	;;
 
 esac
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Solaris/Command/_fmadm	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,111 @@
+#compdef fmadm
+# Synced with the Nevada build 168 man page
+
+_fm_modules() {
+	compadd "[email protected]" - $(fmadm config 2> /dev/null | awk 'NR == 1 {continue} {print $1}')
+}
+
+_fm_faulted_fmris() {
+	compadd "[email protected]" - $(fmadm faulty -r 2> /dev/null | awk '{print $1}')
+}
+
+_fm_faulted_uuids() {
+	compadd "[email protected]" - $(fmadm faulty -s 2> /dev/null | tail +4 | awk '{print $4}')
+}
+
+_fm_faulted_labels() {
+	local q='"'
+	compadd "[email protected]" - $(fmadm faulty -f 2> /dev/null | while read line; do
+		if [[ $line == "----"* ]]; then
+			read line
+			if [[ $line == '"'* ]]; then
+				print ${${line[(r)$q,(rn:2:)$q]}[2,-2]}
+			fi
+		fi
+	done)
+}
+
+_fmadm() {
+	local context state line expl
+	local -A opt_args
+	local -a subcmds
+
+	# TODO: lookup-alias and remove-alias need completion based on the
+	# output of list-alias, but I have no examples of that output.
+
+	subcmds=(
+		"acquit" "config" "faulty" "flush" "load" "unload"
+		"repaired" "replaced" "reset" "rotate"
+		"add-alias" "remove-alias" "lookup-alias" "list-alias" "sync-alias"
+	)
+
+	if [[ $service == "fmadm" ]]; then
+		_arguments -C -A "-*" \
+			'-q[Quite mode]' \
+			'*::command:->subcmd' && return 0
+
+		if (( CURRENT == 1 )); then
+			_wanted commands expl "fmadm subcommand" compadd -a subcmds
+			return
+		fi
+		service="$words[1]"
+		curcontext="${curcontext%:*}=$service:"
+	fi
+
+	case $service in
+	("acquit")
+		_alternative \
+			"fmadm-acquit-label:label:_fm_faulted_labels" \
+			"fmadm-acquit-uuid:uuid:_fm_faulted_uuids" \
+			"fmadm-acquit-fmri:fmri:_fm_faulted_fmris"
+		;;
+
+	("config")
+		;;
+
+	("faulty")
+		_arguments -A "-*" \
+			'-a[Display all faults]' \
+			'-f[Display faulty FRUs]' \
+			'-g[Group faults]' \
+			'-i[Display persistent cache IDs]' \
+			'-n[Limit output to n entries]:number:' \
+			'-p[Page output]' \
+			'-r[Display resources]' \
+			'-s[Display one-line summaries]' \
+			'-u[Only display fault with given uuid]:uuid:_fm_faulted_uuids' \
+			'-v[Display full output]'
+		;;
+
+	("flush")
+		_fm_faulted_fmris
+		;;
+
+	("load")
+		_path_files -g "/*"
+		;;
+
+	("unload")
+		_fm_modules
+		;;
+
+	("repaired"|"replaced")
+		_alternative \
+			"fmadm-acquit-label:label:_fm_faulted_labels" \
+			"fmadm-acquit-fmri:fmri:_fm_faulted_fmris"
+		;;
+
+	("reset")
+		_arguments -A "-*" \
+			'-s[Reset named SERD]:serd:' \
+			':module:_fm_modules'
+		;;
+
+	("rotate")
+		_values "logfile" "errlog" "fltlog" "infolog" "infolog_hival"
+		;;
+
+	esac
+}
+
+_fmadm "[email protected]"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Solaris/Command/_ipadm	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,364 @@
+#compdef ipadm
+# Synced with the Nevada build 171 man page
+
+_ipadm_ifs() {
+	local -a extra
+
+	zparseopts -D -E -a extra /+:
+
+	compadd "[email protected]" - $(ipadm show-if -p -o ifname) $extra[2,-1]
+}
+
+_ipadm_enabled_ifs() {
+	# Interfaces not marked "disabled"
+	compadd "[email protected]" - "${(@)${(@)${(f)$(ipadm show-if -p -o state,ifname)}:#disabled:*}#*:}"
+}
+
+_ipadm_disabled_ifs() {
+	compadd "[email protected]" - "${(@)${(@)${(f)$(ipadm show-if -p -o state,ifname)}#disabled:*}:#*:*}"
+}
+
+_ipadm_vnis() {
+	compadd "[email protected]" - "${(@)${(@)${(f)$(ipadm show-if -p -o class,ifname)}#vni:*}:#*:*}"
+}
+
+_ipadm_ipmps() {
+	compadd "[email protected]" - "${(@)${(@)${(f)$(ipadm show-if -p -o class,ifname)}#ipmp:*}:#*:*}"
+}
+
+_ipadm_get_possible_values() {
+	local -a proto poss
+	local cmd
+
+	cmd=${${(M)words:#set-*}/set/show}
+	if [[ $cmd == "show-prop" ]]; then
+		# You have to specify a protocol for show-prop if you specify a
+		# property, so we loop through them all.
+		poss=()
+		for proto in ipv4 ipv6 icmp tcp udp sctp; do
+			poss=( $poss ${(u)=$(ipadm $cmd -c -p ${IPREFIX%=} -o possible $proto 2> /dev/null)//,/ } )
+		done
+		poss=( ${(u)poss:#\?} )
+	else
+		proto=${=opt_args[-m]:+-m $opt_args[-m]}
+		poss=( ${(u)=$(ipadm $cmd -c -p ${IPREFIX%=} $proto -o possible)//,/ } )
+	fi
+	if [[ $poss[1] == [0-9]##-[0-9]## ]]; then
+		if (( $#poss > 1 )); then
+			_message -e "number in ranges ${(j:, :)poss}"
+		else
+			_message -e "number in range $poss"
+		fi
+	elif [[ -z $poss[1] ]]; then
+		_message -e "value"
+	else
+		compadd "[email protected]" - $poss
+	fi
+}
+
+_ipadm_addrobjs() {
+	compadd "[email protected]" - $(ipadm show-addr -p -o addrobj)
+}
+
+_ipadm_protos() {
+	compadd "[email protected]" - $(ipadm show-prop -c -o proto)
+}
+
+_ipadm() {
+	local context state line expl
+	local -A opt_args
+	local -a subcmds
+	local -a if_properties if_propproperties if_properties2
+	local -a addr_properties addr_propproperties
+	local -a addrobj_properties
+	local -a proto_ipv4_properties proto_ipv6_properties proto_tcp_properties
+	local -a proto_udp_properties proto_sctp_properties proto_icmp_properties
+	local -a proto_all_properties proto_propproperties
+
+	subcmds=(
+		{"show","disable","enable"}"-if"
+		{"create","delete"}"-ip"
+		{"create","delete"}"-vni"
+		{"create","delete","add","remove"}"-ipmp"
+		{"set","reset","show"}"-ifprop"
+		{"create","delete","show","up","down","refresh","disable","enable"}"-addr"
+		{"set","reset","show"}"-addrprop"
+		{"set","reset","show"}"-prop"
+	)
+
+	if_properties=( "ifname" "class" "state" "active" "current" "persistent" "over" )
+
+	if_propproperties=( "ifname" "property" "proto" "perm" "current" "persistent" "default" "possible" )
+
+	if_properties2=(
+		"arp:value:_ipadm_get_possible_values"
+		"forwarding:value:_ipadm_get_possible_values"
+		"metric:value:_ipadm_get_possible_values"
+		"mtu:value:_ipadm_get_possible_values"
+		"nud:value:_ipadm_get_possible_values"
+		"usesrc:value:_ipadm_ifs -/ none"
+		"exchange_routes:value:_ipadm_get_possible_values"
+		"group:value:_ipadm_get_possible_values"
+		"standby:value:_ipadm_get_possible_values"
+	)
+
+	addr_properties=(
+		"broadcast:value:_ipadm_get_possible_values"
+		"deprecated:value:_ipadm_get_possible_values"
+		"prefixlen:value:_ipadm_get_possible_values"
+		"private:value:_ipadm_get_possible_values"
+		"reqhost:value:_ipadm_get_possible_values"
+		"transmit:value:_ipadm_get_possible_values"
+		"zone:value:_zones -t c"
+	)
+
+	addr_propproperties=( "addrobj" "property" "perm" "current" "persistent" "default" "possible" )
+
+	addrobj_properties=(
+		"addrobj" "type" "state" "current" "persistent" "addr"
+		"cid-type" "cid-value" "begin" "expire" "renew"
+	)
+
+	proto_ipv4_properties=( "hostmodel" "ttl" "forwarding" )
+	proto_ipv6_properties=( "hostmodel" "hoplimit" "forwarding" )
+	proto_tcp_properties=( "cong_default" "cong_enabled" "ecn" "extra_priv_ports" "max_buf" "recv_buf"
+		"send_buf" "sack" "smallest_anon_port" "largest_anon_port" "smallest_nonpriv_port" )
+	proto_udp_properties=( "extra_priv_ports" "max_buf" "recv_buf" "send_buf" "smallest_anon_port"
+		"largest_anon_port" "smallest_nonpriv_port" )
+	proto_sctp_properties=( "cong_default" "cong_enabled" "extra_priv_ports" "max_buf" "recv_buf"
+		"send_buf" "smallest_anon_port" "largest_anon_port" "smallest_nonpriv_port" )
+	proto_icmp_properties=( "max_buf" "recv_buf" "send_buf" )
+	proto_all_properties=( $proto_ipv4_properties $proto_ipv6_properties $proto_tcp_properties
+		$proto_udp_properties $proto_sctp_properties $proto_icmp_properties )
+	proto_all_properties=( $^proto_all_properties:value:_ipadm_get_possible_values )
+
+	proto_propproperties=( "proto" "property" "perm" "current" "persistent" "default" "possible" )
+
+	if [[ $service == "ipadm" ]]; then
+		_arguments -C -A "-*" \
+			'-\?[Help]' \
+			'*::command:->subcmd' && return 0
+
+		if (( CURRENT == 1 )); then
+			_wanted commands expl "ipadm subcommand" compadd -a subcmds
+			return
+		fi
+		service="$words[1]"
+		curcontext="${curcontext%:*}=$service:"
+	fi
+
+	case $service in
+	("create-ip")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Interface should be temporary]' \
+			':interface name:'
+		;;
+
+	("delete-ip")
+		_arguments -A "-*" \
+			':interface name:_ipadm_ifs'
+		;;
+
+	("create-vni")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Interface should be temporary]' \
+			':VNI name:'
+		;;
+
+	("delete-vni")
+		_arguments -A "-*" \
+			':VNI name:_ipadm_vnis'
+		;;
+
+	("create-ipmp")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Interface should be temporary]' \
+			'(-i --interface)'{-i,--interface}'[List of underlying interfaces]:interface name:_values -s , "interface" $(ipadm show-if -p -o ifname)' \
+			':IPMP interface name:'
+		;;
+
+	("delete-ipmp")
+		_arguments -A "-*" \
+			'(-f --force)'{-f,--force}'[First remove all underlying interfaces from group]' \
+			':IPMP interface name:_ipadm_ipmps'
+		;;
+
+	("add-ipmp")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Interface should be temporary]' \
+			'(-i --interface)'{-i,--interface}'[List of underlying interfaces]:interface name:_values -s , "interface" $(ipadm show-if -p -o ifname)' \
+			':IPMP interface name:_ipadm_ipmps'
+		;;
+
+	("remove-ipmp")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Interface should be temporary]' \
+			'(-i --interface)'{-i,--interface}'[List of underlying interfaces]:interface name:_values -s , "interface" $(ipadm show-if -p -o ifname)' \
+			':IPMP interface name:_ipadm_ipmps'
+		;;
+
+	("show-if")
+		_arguments -A "-*" \
+			'(-p --parseable)'{-p,--parseable}'[Parseable output]' \
+			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $if_properties' \
+			':interface name:_ipadm_ifs'
+		;;
+
+	("disable-if")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			':interface name:_ipadm_enabled_ifs'
+		;;
+
+	("enable-if")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			':interface name:_ipadm_disabled_ifs'
+		;;
+
+	("set-ifprop")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			'(-m --module)'{-m,--module}'[Protocol]:protocol:(ipv4 ipv6)' \
+			'(-p --prop)'{-p,--prop}'[Property to set]:property:_values -s , "property" $if_properties2' \
+			':interface name:_ipadm_ifs'
+		;;
+
+	("reset-ifprop")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			'(-m --module)'{-m,--module}'[Protocol]:protocol:(ipv4 ipv6)' \
+			'(-p --prop)'{-p,--prop}'[Property to reset]:property:($if_properties2)' \
+			':interface name:_ipadm_ifs'
+		;;
+
+	("show-ifprop")
+		_arguments -A "-*" \
+			'(-c --parseable)'{-c,--parseable}'[Parseable output]' \
+			'(-m --module)'{-m,--module}'[Protocol]:protocol:(ipv4 ipv6)' \
+			'(-o --output)'{-o,--output}'[Property properties to display]:property:_values -s , "property" $if_propproperties' \
+			'(-p --prop)'{-p,--prop}'[Interface properties to display]:property:_values -s , "property" ${if_properties2%%\:*}' \
+			':interface name:_ipadm_ifs'
+		;;
+
+	("create-addr")
+		# This causes all options and arguments following -T to be
+		# stuck into $opt_args[-T].  It feels hacky, but it seems
+		# to do the trick.
+		_arguments -C -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Address should be temporary]' \
+			'-T[Address type]:*::address type:->newaddr'
+
+		if [[ $state == "newaddr" ]]; then
+
+			case ${opt_args[-T]#-T:} in
+			("static:"*)
+				local -a addrthingsv4
+				addrthingsv4=( "local:address: " "remote:address: ")
+				_arguments -A "-*" \
+				'(-d --down)'{-d,--down}'[Address should be marked down]' \
+				'(-a --address)'{-a,--address}'[Address specification]:address:_values -s , "address" $addrthingsv4' \
+				':address object name:_ipadm_addrobjs'
+				;;
+
+			("dhcp:"*)
+				_arguments -A "-*" \
+				'(-w --wait)'{-w,--wait}'[Seconds to wait for completion]:number or "forever":{if [[ -prefix [0-9]## ]]; then _message -e "number of seconds"; else _wanted forever expl "number or \"forever\"" compadd forever; fi}' \
+				'-h[Request a specific hostname]:hostname:' \
+				':address object name:_ipadm_addrobjs'
+				;;
+
+			("addrconf:"*)
+				local -a addrthingsv6 statefulness
+				addrthingsv6=( "local:interface id: " "remote:interface id: ")
+				statefulness=( "stateful:statefulness:(yes no)" "stateless:statelessness:(yes no)" )
+				_arguments -A "-*" \
+				'(-i --interface-id)'{-i,--interface-id}'[Interface ID]:address:_values -s , "interface id" $addrthingsv6' \
+				'(-p --prop)'{-p,--prop}'[Statefulness configuration]:statefulness configuration:_values -s , "statefulness" $statefulness' \
+				':address object name:_ipadm_addrobjs'
+				;;
+			(*)
+				_wanted commands expl "address type" compadd static dhcp addrconf
+				;;
+			esac
+		fi
+
+		;;
+
+	("delete-addr")
+		_arguments -A "-*" \
+			'(-r --release)'{-r,--release}'[Release DHCP-acquired address]' \
+			':address object name:_ipadm_addrobjs'
+		;;
+
+	("show-addr")
+		_arguments -A "-*" \
+			'(-d --dhcp -p --parseable)'{-d,--dhcp}'[Display DHCP status fields]' \
+			'(-p --parseable -d --dhcp)'{-p,--parseable}'[Parseable output]' \
+			'(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $addrobj_properties' \
+			':address object name:_ipadm_addrobjs'
+		;;
+
+	({"up","down","disable","enable"}"-addr")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			':address object name:_ipadm_addrobjs'
+		;;
+
+	("refresh-addr")
+		_arguments -A "-*" \
+			'(-i --inform)'{-i,--inform}'[Retrieve DHCP parameters]' \
+			':address object name:_ipadm_addrobjs'
+		;;
+
+	("set-addrprop")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			'(-p --prop)'{-p,--prop}'[Property to set]:property:_values -s , "property" $addr_properties' \
+			':address object name:_ipadm_addrobjs'
+		;;
+
+	("reset-addrprop")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			'(-p --prop)'{-p,--prop}'[Property to reset]:property:(${addr_properties%%\:*})' \
+			':address object name:_ipadm_addrobjs'
+		;;
+
+	("show-addrprop")
+		_arguments -A "-*" \
+			'(-c --parseable)'{-c,--parseable}'[Parseable output]' \
+			'(-o --output)'{-o,--output}'[Property properties to display]:property:_values -s , "property" $addr_propproperties' \
+			'(-p --prop)'{-p,--prop}'[Address object properties to display]:property:_values -s , "property" ${addr_properties%%\:*}' \
+			':address object name:_ipadm_addrobjs'
+		;;
+
+	("set-prop")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			'(-p --prop)'{-p,--prop}'[Property to set]:property:_values -s , "property" $proto_all_properties' \
+			':protocol name:_ipadm_protos'
+		;;
+
+	("reset-prop")
+		_arguments -A "-*" \
+			'(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \
+			'(-p --prop)'{-p,--prop}'[Property to reset]:property:(${proto_all_properties%%\:*})' \
+			':protocol name:_ipadm_protos'
+		;;
+
+	("show-prop")
+		_arguments -A "-*" \
+			'(-c --parseable)'{-c,--parseable}'[Parseable output]' \
+			'(-o --output)'{-o,--output}'[Property properties to display]:property:_values -s , "property" $proto_propproperties' \
+			'(-p --prop)'{-p,--prop}'[Protocol properties to display]:property:_values -s , "property" ${proto_all_properties%%\:*}' \
+			':protocol name:_ipadm_protos'
+		;;
+
+	(*)
+		_message "unknown ipadm subcommand: $service"
+		;;
+	esac
+}
+
+_ipadm "[email protected]"
--- a/components/zsh/Completion/Solaris/Command/_pkg5	Wed Jul 20 13:54:22 2011 -0700
+++ b/components/zsh/Completion/Solaris/Command/_pkg5	Wed Jul 20 16:57:37 2011 -0700
@@ -46,6 +46,10 @@
 	compadd "[email protected]" - ${_pkg5_known_pkgs}
 }
 
+_pkg5_avoided_pkgs() {
+	compadd "[email protected]" - $(pkg -R $pkg5_root unavoid)
+}
+
 _pkg5_pubs() {
 	compadd "[email protected]" - $(pkg -R $pkg5_root publisher -H | awk '{print $1}')
 }
@@ -76,11 +80,12 @@
 	local -a subcmds pkg5_actions pkg5_cattr pkg5_sattr
 
 	subcmds=(
-		install uninstall list image-update refresh version
-		info search verify fix contents image-create history
-		{change-,}{variant,facet}
-		{{un,}set-,}property {{un,}set-,}publisher
-		purge-history rebuild-index
+		install uninstall list update refresh version help
+		info search verify fix revert contents image-create
+		{change-,}{variant,facet} avoid unavoid history
+		{{un,}set-,}property {add,remove}-property-value
+		{{un,}set-,}publisher purge-history rebuild-index
+		update-format
 	)
 
 	pkg5_actions=(
@@ -121,6 +126,13 @@
 			'-n[Dry run]' \
 			'-q[Quiet]' \
 			'-v[Verbose]' \
+			'-g[Specify additional source of packages]:source:_path_files -/' \
+			"--accept[Accept all licenses]" \
+			"--licenses[Display all licenses]" \
+			"(--require-new-be)--deny-new-be[Fail the operation if a new BE would be required]" \
+			"(--deny-new-be)--require-new-be[Force a new BE to be created]" \
+			"--be-name[Specify a BE name]:BE name: " \
+			"--reject[Specify an FMRI to exclude from the result]:fmri:_pkg5_pkgs" \
 			"--no-refresh[Don't refresh catalogs]" \
 			"--no-index[Don't reindex search database]" \
 			'*:package:_pkg5_pkgs_a'
@@ -132,6 +144,27 @@
 			'-q[Quiet]' \
 			'-r[Recursively uninstall dependencies]' \
 			'-v[Verbose]' \
+			"(--require-new-be)--deny-new-be[Fail the operation if a new BE would be required]" \
+			"(--deny-new-be)--require-new-be[Force a new BE to be created]" \
+			"--be-name[Specify a BE name]:BE name: " \
+			"--no-index[Don't reindex search database]" \
+			'*:package:_pkg5_pkgs'
+		;;
+
+	("update")
+		_arguments -A "-*" \
+			"-f[Don't check for pkg(5) updates]" \
+			'-n[Dry run]' \
+			'-q[Quiet]' \
+			'-v[Verbose]' \
+			'-g[Specify additional source of packages]:source:_path_files -/' \
+			"--accept[Accept all licenses]" \
+			"--licenses[Display all licenses]" \
+			"(--require-new-be)--deny-new-be[Fail the operation if a new BE would be required]" \
+			"(--deny-new-be)--require-new-be[Force a new BE to be created]" \
+			'--be-name[Specify a BE name]:name:' \
+			"--reject[Specify an FMRI to exclude from the result]:fmri:_pkg5_pkgs" \
+			"--no-refresh[Don't refresh catalogs]" \
 			"--no-index[Don't reindex search database]" \
 			'*:package:_pkg5_pkgs'
 		;;
@@ -141,6 +174,7 @@
 			'-H[Omit headers]' \
 			'-a[Show not-installed packages]' \
 			'-f[Show all versions]' \
+			'-g[Specify additional source of packages]:source:_path_files -/' \
 			'-n[Show newest versions]' \
 			'-s[Show summaries]' \
 			'-u[Show upgradable versions]' \
@@ -149,17 +183,6 @@
 			'*:package:_pkg5_pkgs_a'
 		;;
 
-	("image-update")
-		_arguments -A "-*" \
-			"-f[Don't check for pkg(5) updates]" \
-			'-n[Dry run]' \
-			'-q[Quiet]' \
-			'-v[Verbose]' \
-			'--be-name[Set new boot environment name]:name:' \
-			"--no-refresh[Don't refresh catalogs]" \
-			"--no-index[Don't reindex search database]"
-		;;
-
 	("refresh")
 		_arguments -A "-*" \
 			"--full[Full refresh]" \
@@ -197,11 +220,24 @@
 
 	("fix")
 		_arguments -A "-*" \
-			'--accept[Force acceptance of license(s)]' \
-			'--licenses[Display license text(s)]' \
+			'--accept[Accept all licenses]' \
+			'--licenses[Display all licenses]' \
 			'*:package:_pkg5_pkgs'
 		;;
 
+	("revert")
+		_arguments -A "-*" \
+			'-n[Dry run]' \
+			'-v[Verbose]' \
+			"(--require-new-be)--deny-new-be[Fail the operation if a new BE would be required]" \
+			"(--deny-new-be)--require-new-be[Force a new BE to be created]" \
+			'--tagged[Revert all tagged files]:tag:' \
+			'--be-name[Specify a BE name]:name:' \
+			"--no-refresh[Don't refresh catalogs]" \
+			"--no-index[Don't reindex search database]" \
+			'*:file:_path_files'
+		;;
+
 	("contents")
 		_arguments -A "-*" \
 			'-H[Omit headers]' \
@@ -235,7 +271,12 @@
 			'-n[Dry run]' \
 			'-q[Quiet'] \
 			'-v[Verbose'] \
-			'--be-name[Set new boot environment name]:name:' \
+			'-g[Specify additional source of packages]:source:_path_files -/' \
+			'--accept[Accept all licenses]' \
+			'--licenses[Display all licenses]' \
+			"(--require-new-be)--deny-new-be[Fail the operation if a new BE would be required]" \
+			"(--deny-new-be)--require-new-be[Force a new BE to be created]" \
+			'--be-name[Specify a BE name]:name:' \
 			"*:variant:_values -s , 'variant' $(pkg -R $pkg5_root variant -H | awk '{print $1}')" \
 		;;
 
@@ -244,7 +285,12 @@
 			'-n[Dry run]' \
 			'-q[Quiet'] \
 			'-v[Verbose'] \
-			'--be-name[Set new boot environment name]:name:' \
+			'-g[Specify additional source of packages]:source:_path_files -/' \
+			'--accept[Accept all licenses]' \
+			'--licenses[Display all licenses]' \
+			"(--require-new-be)--deny-new-be[Fail the operation if a new BE would be required]" \
+			"(--deny-new-be)--require-new-be[Force a new BE to be created]" \
+			'--be-name[Specify a BE name]:name:' \
 			"*:facet:_values -s , 'facet' $(pkg -R $pkg5_root facet -H | awk '{print $1}')" \
 		;;
 
@@ -260,12 +306,34 @@
 			'*:facet:_pkg5_facets'
 		;;
 
+	("avoid")
+		_arguments -A "-*" \
+			'*:package:_pkg5_pkgs_a'
+		;;
+
+	("unavoid")
+		_arguments -A "-*" \
+			'*:package:_pkg5_avoided_pkgs'
+		;;
+
 	("set-property")
 		_arguments -A "-*" \
 			':property:_pkg5_properties' \
 			':value:'
 		;;
 
+	("add-property-value")
+		_arguments -A "-*" \
+			':property:_pkg5_properties' \
+			':value:'
+		;;
+
+	("remove-property-value")
+		_arguments -A "-*" \
+			':property:_pkg5_properties' \
+			':value:'
+		;;
+
 	("unset-property")
 		_arguments -A "-*" \
 			'*:property:_pkg5_properties'
@@ -310,9 +378,18 @@
 		;;
 
 	("history")
+		local -a hist_columns
+		hist_columns=(
+			"be" "be_uuid" "client" "client_ver" "command" "finish"
+			"id" "new_be" "new_be_uuid" "operation" "outcome"
+			"reason" "snapshot" "start" "time" "user"
+		)
 		_arguments -A "-*" \
 			'-H[Omit headers]' \
-			'-l[Long history]'
+			'-l[Long history]' \
+			'-n[Last n records]:number:' \
+			'-o[Column]:number:_values -s , "column" $hist_columns' \
+			'-t[Time range]'
 		;;
 
 	(*)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Solaris/Command/_zlogin	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,19 @@
+#compdef zlogin
+# Synced with the Nevada build 162 man page
+
+_zlogin() {
+	_arguments -s \
+		'-E[Disable escape character]' \
+		'-e[Specify escape character]:character:' \
+		'-l[Specify username]:username:_users' \
+		':zonename:_zones' \
+		- set1 \
+		'-C[Connect to zone console]' \
+		'-d[Disconnect on zone halt]' \
+		- set2 \
+		'-S["Safe" login mode]' \
+		'(-):command name: _command_names -e' \
+		'*::utility: _normal'
+}
+
+_zlogin "[email protected]"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Solaris/Command/_zoneadm	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,146 @@
+#compdef zoneadm
+# Synced with the Solaris 11 build 168 man page
+
+_zoneadm_bootargs() {
+	# This is a subset of the arguments to kernel(1M)
+	_arguments -A "-*" \
+		'-i[Alternate init]:path:_path_files' \
+		'-m[SMF options]:option:_values "SMF option" debug milestone= quiet verbose' \
+		'-s[Boot single user]'
+}
+
+_zoneadm() {
+	local context state line expl
+	typeset -A opt_args
+	local -a subcmds fields
+	local -a ipkg_attach ipkg_install
+	local brand brand_args
+
+	subcmds=(
+		attach boot clone detach halt help install list mark move
+		ready reboot uninstall verify
+	)
+
+	ipkg_attach=(
+		'(-d)-a[Path to archive]:path:_path_files'
+		'(-a)-d[Path to zonepath]:directory:_path_files -/'
+	)
+	ipkg_install=(
+		- set1
+		'-c[Path to certificate]:path:_path_files'
+		'*-e[Additional package]:package:'
+		'-k[Path to key]:path:_path_files'
+		'-P[Publisher/URI mapping]:publisher:'
+		- set2
+		'(-d)-a[Path to archive]:path:_path_files'
+		'(-a)-d[Path to installed zone root]:directory:path_files -/'
+		'-p[Preserve system configuration]'
+		'-s[Install silently]'
+		'-u[Unconfigure after installation]'
+		'-v[Verbose]'
+	)
+
+	solaris10_attach=(
+		'(-d)-a[Path to archive]:path:_path_files'
+		'(-a)-d[Path to zonepath]:directory:_path_files -/'
+	)
+	solaris10_install=(
+		'(-d)-a[Path to archive]:path:_path_files'
+		'(-a)-d[Path to installed zone root]:directory:path_files -/'
+		'-p[Preserve system configuration]'
+		'-s[Install silently]'
+		'-u[Unconfigure after installation]'
+		'-v[Verbose]'
+	)
+
+	if [[ $service == "zoneadm" ]]; then
+		_arguments -C -A "-*" \
+			'-R[Alternate root]:alternate root:_path_files -/' \
+			'-u[Zone UUID]:zone UUID: ' \
+			'-z[Zone name]:zone name:_zones' \
+			'*::command:->subcmd' && return 0
+
+		if (( CURRENT == 1 )); then
+			_wanted commands expl "zoneadm subcommand" compadd -a subcmds
+			return
+		fi
+		service="$words[1]"
+		curcontext="${curcontext%:*}=$service:"
+	fi
+
+	case $service in
+	("boot")
+		# Completion of boot arguments after -- is kinda hacky.
+		_arguments -S -A "-*" \
+			'-w[Force writable root]' \
+			'-W[Boot in transient r/w mode]' \
+			'*:boot options:_zoneadm_bootargs'
+		;;
+
+	("clone")
+		_arguments -A "-*" \
+			'-m[Clone mode]:mode:_values "mode" copy' \
+			'-s[Source snapshot]:snapshot:_zfs_dataset -t snap' \
+			':source zone:_zones'
+		;;
+
+	("attach")
+		if [[ -n $opt_args[-z] ]]; then
+			brand=${"${(@s,:,)$(zoneadm -z $opt_args[-z] list -p)}"[6]}
+			brand_args=${brand}_attach
+		fi
+		_arguments -A "-*" \
+			'-F[Force attach]' \
+			'-n[Path to zone manifest]:path to zone manifest:_path_files' \
+			'-u[Update on attach]' \
+			${(P)brand_args}
+		;;
+
+	("detach")
+		_arguments -A "-*" \
+			'-n[Dry run]'
+		;;
+
+	("halt"|"ready"|"reboot"|"verify")
+		;;
+
+
+	("help")
+		_wanted commands expl "zoneadm subcommand" compadd -a subcmds
+		;;
+
+	("install")
+		if [[ -n $opt_args[-z] ]]; then
+			brand=${"${(@s,:,)$(zoneadm -z $opt_args[-z] list -p)}"[6]}
+			brand_args=${brand}_install
+		fi
+		_arguments -A "-*" \
+			${(P)brand_args}
+		;;
+
+	("list")
+		_arguments -A "-*" \
+			'-c[Configured zones]' \
+			'-i[Installed zones]' \
+			'(-v)-p[Parsable output]' \
+			'(-p)-v[Verbose mode]'
+		;;
+
+	("mark")
+		_arguments -A "-*" \
+			':"incomplete":_values \"incomplete\" incomplete'
+		;;
+
+	("move")
+		_arguments -A "-*" \
+			':new zone path:_path_files -/'
+		;;
+
+	("uninstall")
+		_arguments -A "-*" \
+			'-F[Force]'
+		;;
+	esac
+}
+
+_zoneadm "[email protected]"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Solaris/Type/_svcs_fmri	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,96 @@
+#autoload
+
+_svcs_fmri() {
+	local type="$argv[$#]"
+	local fmri_abbrevs m i
+	typeset -a -g _smf_fmris
+
+	local update_policy
+	zstyle -s ":completion:${curcontext}:" cache-policy update_policy
+	if [[ -z "$update_policy" ]]; then
+		zstyle ":completion:${curcontext}:" cache-policy _smf_caching_policy
+	fi
+	# The cache really must be per-host
+	local cache_id=smf_fmri:$HOST
+
+	# TODO: Do something useful with the expand and/or ambiguous styles.
+	case $type in
+	(-i|-c)
+		# We probably also need an option to eliminate ambiguous
+		# results for use in places where that's not allowed.
+
+		# Grab all FMRIs that have a word beginning with $PREFIX,
+		# making sure not to return the portion of the FMRI before
+		# $PREFIX.  Use the cache if it exists and the user wants to.
+		if ( [[ $#_smf_fmris -eq 0 ]] || _cache_invalid $cache_id ) \
+			&& ! _retrieve_cache $cache_id; then
+			_smf_fmris=( ${(f)"$(svcs -a -H -o fmri)"} )
+			_store_cache $cache_id _smf_fmris
+		fi
+		# Each element of the array is removed which doesn't match
+		# (^|.*/)$PREFIX.*
+		fmri_abbrevs=( ${(M)_smf_fmris:#((#s)|*[/:])$PREFIX*} )
+
+		# Go through the remaining elements and remove the characters
+		# in front of $PREFIX.
+		for ((i = 1; i < $#fmri_abbrevs; i++ )); do
+			# Either one of these will work, but they're too
+			# greedy, preventing multiple matches below.
+			fmri_abbrevs[i]=${${fmri_abbrevs[i]}/((#s)|*[\/:])(#b)($PREFIX*)/$match[1]}
+			#fmri_abbrevs[i]=${${(M)${fmri_abbrevs[i]}:#(#b)((#s)|*/)$PREFIX*}#$match[1]}
+		done
+
+		# Remove the "default" instance identifier if it's the only
+		# instance for a given service (not for svccfg).
+		if [[ $type == "-i" ]]; then
+			local -a svcs insts nabbrevs
+			local s
+			svcs=( ${(u)fmri_abbrevs%:*} )
+			for s in $svcs; do
+				insts=( ${(@M)fmri_abbrevs:#$s:*} )
+				if [[ $#insts -eq 1 && $insts[1] == *":default" ]]; then
+					nabbrevs=($nabbrevs ${insts//:default})
+				elif [[ $#insts -eq 0 ]]; then
+					# Turns out we're completing the
+					# instance name.
+					nabbrevs=($nabbrevs $s)
+				else
+					nabbrevs=($nabbrevs $insts)
+				fi
+			done
+			fmri_abbrevs=( $nabbrevs )
+		fi
+
+		# After playing with _multi_parts, I'm not sure it's actually
+		# that useful.
+		# _wanted fmri expl "full or unambiguously abbreviated FMRIs" \
+		# 	_multi_parts -i / fmri_abbrevs
+
+		_wanted fmri expl "full or unambiguously abbreviated FMRIs" \
+			compadd $fmri_abbrevs
+		;;
+
+	(-m)
+		_wanted fmri expl "milestone FMRIs" \
+			compadd $(svcs -H -o fmri svc:/milestone/\*) all
+		;;
+
+	(-r)
+		# TODO: need some way to pick out only restarters
+		_wanted fmri expl "restarter FMRIs" \
+			compadd master svc:/network/inetd:default
+		;;
+
+	(*)
+		_message "unknown argument to _svcs_fmri: $type"
+		;;
+	esac
+}
+
+_smf_caching_policy() {
+	# /etc/svc/repository.db is not a public interface, so this is kinda
+	# grody.
+	[[ ! -f "$1" || /etc/svc/repository.db -nt "$1" ]]
+}
+
+_svcs_fmri "[email protected]"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Solaris/Type/_zones	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,13 @@
+#autoload
+
+local -a type typearg
+local zonelist
+
+zparseopts -D -E -a type t+:
+
+[[ -n $type[(r)c] ]] && typearg=-c
+[[ -n $type[(r)i] ]] && typearg=-i
+
+zonelist=( ${="$(zoneadm list $typearg)"} )
+
+compadd "[email protected]" - $zonelist
--- a/components/zsh/Completion/Unix/Command/_zfs	Wed Jul 20 13:54:22 2011 -0700
+++ b/components/zsh/Completion/Unix/Command/_zfs	Wed Jul 20 16:57:37 2011 -0700
@@ -1,16 +1,18 @@
 #compdef zfs
-# Synced with the Nevada build 131 man page
+# Synced with the Nevada build 170 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 difffields delegatable_perms
 
 	subcmds=(
 		"create" "destroy" "clone" "promote" "rename" "snapshot"
 		"rollback" "list" "set" "get" "inherit" "mount" "unmount"
 		"share" "unshare" "send" "receive" "allow" "unallow"
 		"upgrade" "userspace" "groupspace" "hold" "holds" "release"
+		"diff" "key" "help"
 	)
 
 	# TODO: [email protected] and [email protected] could have more extensive handling
@@ -19,22 +21,25 @@
 		"compressratio" "mounted" "origin" "usedbychildren"
 		"usedbydataset" "usedbyrefreservation" "usedbysnapshots"
 		"defer_destroy" "[email protected]" "userrefs" "[email protected]"
+		"keystatus" "rekeydate"
 	)
 
 	# TODO: Be cleverer about what values can be set.  Is there any way to
 	# set the sorting for *size properties to false by default?
 	rw_properties=(
 		"aclinherit:value:(discard noallow restricted passthrough passthrough-x)"
-		"aclmode:value:(discard groupmask passthrough)"
+		"aclmode:value:(discard mask passthrough)"
 		"atime:value:(on off)"
 		"canmount:value:(on off noauto)"
-		"checksum:value:(on off fletcher2 fletcher4 sha256)"
+		"checksum:value:(on off fletcher2 fletcher4 sha256 sha256+mac)"
 		"compression:value:(on off lzjb gzip gzip-{1..9} zle)"
 		"copies:value:(1 2 3)"
 		"dedup:value:(on off verify sha256 sha256,verify)"
 		"devices:value:(on off)"
+		"encryption:value:(off on aes128-ccm aes-192-ccm aes-256-ccm aes-128-gcm aes-192-gcm aes-256-gcm)"
 		"exec:value:(on off)"
 		"[email protected]:value:" # TODO: complete group=size|none
+		"keysource:value:_zfs_keysource_props"
 		"logbias:value:(latency throughput)"
 		"mlslabel:value:(none)" # TODO: list sensitivity labels
 		"mountpoint:path, 'legacy', or 'none':{if [[ -prefix /* ]]; then _path_files -/; else _wanted mountpoints expl 'mountpoint (type \"/\" to start completing paths)' compadd legacy none; fi}"
@@ -42,18 +47,21 @@
 		"primarycache:value:(all none metadata)"
 		"quota:number or 'none':{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ $PREFIX == quota= ]]; then _wanted none expl 'number or none' compadd none; else _wanted none expl 'quota' compadd none; fi}"
 		"readonly:value:(on off)"
-		"recordsize:value:(512 1K 2K 4K 8K 16K 32K 64K 128K)"
+		"recordsize:value:(512 1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M)"
 		"refquota:number or 'none':{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ $PREFIX == refquota= ]]; then _wanted none expl 'number or none' compadd none; else _wanted none expl 'refquota' compadd none; fi}"
 		"refreservation:number or 'none':{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ $PREFIX == refreservation= ]]; then _wanted none expl 'number or none' compadd none; else _wanted none expl 'refreservation' compadd none; fi}"
 		"reservation:value:{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ $PREFIX == reservation= ]]; then _wanted none expl 'number or none' compadd none; else _wanted none expl 'reservation' compadd none; fi}"
+		"rstchown:value:(on off)"
 		"secondarycache:value:(all none metadata)"
 		"setuid:value:(on off)"
-		"shareiscsi:value:(on off type=disk)"
-		"sharenfs:value:(on off)" # or share(1M) options
-		"sharesmb:value:(on off)" # or sharemgr(1M) options
+		"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)"
 		"[email protected]:value:" # TODO: complete user=size|none
-		"version:value:(1 2 current)"
+		"version:value:(1 2 3 4 current)"
 		"volsize:value:" # <size>
 		"vscan:value:(on off)"
 		"xattr:value:(on off)"
@@ -65,17 +73,24 @@
 		"casesensitivity:value:(sensitive insensitive mixed)"
 		"normalization:value:(none formC formD formKC formKD)"
 		"utf8only:value:(on off)"
-		"volblocksize:value:(512 1K 2K 4K 8K 16K 32K 64K 128K)"
+		"volblocksize:value:(512 1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M)"
 	)
 
 	delegatable_perms=(
-		"allow" "clone" "create" "destroy" "mount" "promote"
-		"receive" "rename" "rollback" "send" "share" "snapshot"
+		"allow" "clone" "create" "destroy" "diff" "hold" "key"
+		"keychange" "mount" "promote" "receive" "release" "rename"
+		"rollback" "send" "share" "snapshot"
+		"groupused" "userused" "userprop"
 		${create_properties%%:*}
 	)
 
 	rw_propnames=( ${rw_properties%%:*} )
 
+	difffields=(
+		object parent size links linkschange name oldname user group
+		ctime mtime atime crtime
+	)
+
 	if [[ $service == "zfs" ]]; then
 		_arguments -C -A "-*" \
 			'-\?[Help]' \
@@ -134,6 +149,7 @@
 		# XXX needs to bail if there are no snapshots
 		_arguments -A "-*" \
 			'-p[Create parent datasets]' \
+			'-K[Create encryption key]' \
 			'-o[Set property]:property:_values -s , "property" $create_properties' \
 			':snapshot:_zfs_dataset -t snap' \
 			':filesystem/volume:'
@@ -166,11 +182,12 @@
 			'*-s[Sort key (ascending)]:property:_values "property" $ro_properties $rw_propnames' \
 			'*-S[Sort key (descending)]:property:_values "property" $ro_properties $rw_propnames' \
 			'-t[Dataset types to list]:dataset type:_values -s , "dataset type" filesystem snapshot volume' \
-			'*:filesystem/volume/snapshot:_zfs_dataset'
+			'*:filesystem/volume/snapshot/path:_zfs_dataset -p'
 		;;
 
 	("set")
 		_arguments \
+			'-r[Recursively apply value]' \
 			':property:_values -s , "property" $rw_properties' \
 			'*:filesystem/volume:_zfs_dataset -t fs -t vol'
 		;;
@@ -246,12 +263,18 @@
 
 	("send")
 		_arguments -A "-*" \
+			'-b' \
 			'-i[Generate an incremental stream]:snapshot:_zfs_dataset -t snap' \
 			'-D[Perform dedup processing]' \
+			'-p[Send properties]' \
+			'-v[Verbose]' \
+			- set1 \
 			'-I[Generate an incremental stream with intermediary snapshots]:snapshot:_zfs_dataset -t snap' \
-			'-p[Send properties]' \
 			'-R[Generate a replication stream package]' \
-			'-v[Verbose]' \
+			':snapshot:_zfs_dataset -t snap' \
+			- set2 \
+			'-c[Create a self-contained stream]' \
+			'-r[Generate a recursive stream package]' \
 			':snapshot:_zfs_dataset -t snap'
 		;;
 
@@ -261,10 +284,14 @@
 			'-n[Do not receive the stream]' \
 			'-F[Force a rollback if necessary]' \
 			'-u[Filesystem is not mounted]' \
+			'-o[Include property change in the stream]::' \
+			'-x[Exclude property change from the stream]:property:' \
 			- set1 \
 			':filesystem/volume/snapshot:_zfs_dataset' \
 			- set2 \
-			'-d[Set path prefix]:filesystem:_zfs_dataset -t fs'
+			'(-e)-d[Set path prefix from stream, excluding only pool name]' \
+			'(-d)-e[Set path prefix from stream, using last path element]' \
+			'-:filesystem:_zfs_dataset -t fs'
 		;;
 
 	("allow")
@@ -355,6 +382,41 @@
 			':snapshot:_zfs_dataset -t snap'
 		;;
 
+	("diff")
+		_arguments -A "-*" \
+			'-F[Add column for filetype character]' \
+			'-H[Parseable output]' \
+			'-e[Only show new and changed files]' \
+			'*-o[Show fields]:field:_values "field" $difffields' \
+			'-t[Add column for ctime]' \
+			- set1 \
+			':snapshot:_zfs_dataset -t snap' \
+			':snapshot or filesystem:_zfs_dataset -t snap -t fs' \
+			- set2 \
+			'-E[Show difference from empty]' \
+			':snapshot or filesystem:_zfs_dataset -t snap -t fs'
+		;;
+
+	("key")
+		_arguments -A "-*" \
+			- set1 \
+			'-a[Apply to all datasets in all pools]' \
+			'(-u -K -f)-l[Load the encryption key]' \
+			'(-l -K)-u[Unload the encryption key]' \
+			'(-l -u -f)-K[Create a new data encryption key]' \
+			'(-l -K)-f[Unmount the dataset before unloading the encryption key]' \
+			'-r[Apply recursively]' \
+			':filesystem or volume:_zfs_dataset -t fs -t vol' \
+			- set2 \
+			'-c[Change the encryption key]' \
+			'-o[Change a property]:property:_zfs_keysource_props' \
+			':filesystem or volume:_zfs_dataset -t fs -t vol'
+		;;
+
+	("help")
+		compadd property $subcmds $ro_properties ${rw_properties%%:*}
+		;;
+
 	(*)
 		_message "unknown zfs subcommand: $service"
 		;;
--- a/components/zsh/Completion/Unix/Command/_zpool	Wed Jul 20 13:54:22 2011 -0700
+++ b/components/zsh/Completion/Unix/Command/_zpool	Wed Jul 20 16:57:37 2011 -0700
@@ -1,5 +1,5 @@
 #compdef zpool
-# Synced with the Nevada build 131 man page
+# Synced with the Nevada build 168 man page
 
 _zpool() {
 	local context state line expl
@@ -17,7 +17,7 @@
 
 	ro_props=(
 		"all[All properties]"
-		"alloc[Space allocated]"
+		"allocated[Space allocated]"
 		"capacity[Space used (percentage)]"
 		"dedupratio[Deduplication ratio]"
 		"free[Space unallocated]"
@@ -32,6 +32,7 @@
 		"autoreplace[Automatic device replacement]:value:(on off)"
 		"bootfs[Default bootable dataset]:value:"
 		"cachefile[Pool configuration cache file location]:value:"
+		"dedupditto[Threshold for number of copies]:value:"
 		"delegation[Delegated administration]:value:(on off)"
 		"failmode[Failure-mode behavior]:value:(wait continue panic)"
 		"listsnaps[Show snapshots in 'zfs list']:value:(on off)"
@@ -42,33 +43,40 @@
 
 	create_properties_dataset=(
 		"aclinherit:value:(discard noallow restricted passthrough passthrough-x)"
-		"aclmode:value:(discard groupmask passthrough)"
+		"aclmode:value:(discard mask passthrough)"
 		"atime:value:(on off)"
 		"canmount:value:(on off noauto)"
-		"checksum:value:(on off fletcher2 fletcher4 sha256)"
-		"compression:value:(on off lzjb gzip gzip-{1..9})"
+		"checksum:value:(on off fletcher2 fletcher4 sha256 sha256+mac)"
+		"compression:value:(on off lzjb gzip gzip-{1..9} zle)"
 		"copies:value:(1 2 3)"
+		"dedup:value:(on off verify sha256 sha256,verify)"
 		"devices:value:(on off)"
+		"encryption:value:(off on aes128-ccm aes-192-ccm aes-256-ccm aes-128-gcm aes-192-gcm aes-256-gcm)"
 		"exec:value:(on off)"
 		"[email protected]:value:" # TODO: complete group=size|none
+		"keysource:value:_zfs_keysource_props"
 		"logbias:value:(latency throughput)"
+		"mlslabel:value:(none)" # TODO: list sensitivity labels
 		"mountpoint:path, 'legacy', or 'none':{if [[ -prefix /* ]]; then _path_files -/; else _wanted mountpoints expl 'mountpoint (type \"/\" to start completing paths)' compadd legacy none; fi}"
 		"nbmand:value:(on off)"
 		"primarycache:value:(all none metadata)"
 		"quota:number or 'none':{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ $PREFIX == quota= ]]; then _wanted none expl 'number or none' compadd none; else _wanted none expl 'quota' compadd none; fi}"
 		"readonly:value:(on off)"
-		"recordsize:value:(512 1K 2K 4K 8K 16K 32K 64K 128K)"
+		"recordsize:value:(512 1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M)"
 		"refquota:number or 'none':{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ $PREFIX == refquota= ]]; then _wanted none expl 'number or none' compadd none; else _wanted none expl 'refquota' compadd none; fi}"
 		"refreservation:number or 'none':{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ $PREFIX == refreservation= ]]; then _wanted none expl 'number or none' compadd none; else _wanted none expl 'refreservation' compadd none; fi}"
 		"reservation:value:{if [[ -prefix [0-9]## ]]; then _message -e 'number'; elif [[ $PREFIX == reservation= ]]; then _wanted none expl 'number or none' compadd none; else _wanted none expl 'reservation' compadd none; fi}"
+		"rstchown:value:(on off)"
 		"secondarycache:value:(all none metadata)"
 		"setuid:value:(on off)"
-		"shareiscsi:value:(on off type=disk)"
-		"sharenfs:value:(on off)" # or share(1M) options
-		"sharesmb:value:(on off)" # or sharemgr(1M) options
+		"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)"
 		"[email protected]:value:" # TODO: complete user=size|none
-		"version:value:(1 2 current)"
+		"version:value:(1 2 3 4 current)"
 		"volsize:value:" # <size>
 		"vscan:value:(on off)"
 		"xattr:value:(on off)"
@@ -103,6 +111,7 @@
 			'-o[Set pool property at creation time]:property:_values -s , "property" $rw_props' \
 			'-O[Set dataset property at creation time]:property:_values -s , "property" $create_properties_dataset' \
 			'-f[Force use of in-use devices]' \
+			'-l[Display configuration in /dev/chassis location form]' \
 			'-n[Display configuration without creating pool]' \
 			'-R[Use alternate root]:alternate root:_files -/' \
 			'-m[Set mountpoint for root dataset]:mountpoint:' \
@@ -119,6 +128,7 @@
 	(add)
 		_arguments -A "-*" \
 			'-f[Force use of in-use devices]' \
+			'-l[Display configuration in /dev/chassis location form]' \
 			'-n[Display configuration without modifying pool]' \
 			':pool name:_zfs_pool' \
 			'*:virtual device:_files'
@@ -127,12 +137,14 @@
 	(list)
 		_arguments \
 			'-H[Scripted mode]' \
+			'-T[timestamp]:value:(u d)' \
 			'-o[Fields to list]:field:_values -s , "field" $fields' \
 			'::pool name:_zfs_pool'
 		;;
 
 	(iostat)
 		_arguments -A "-*" \
+			'-l[Display configuration in /dev/chassis location form]' \
 			'-T[timestamp]:value:(u d)' \
 			'-v[Verbose statistics]' \
 			'*::pool name:_zfs_pool' \
@@ -142,8 +154,10 @@
 
 	(status)
 		_arguments -A "-*" \
+			'-l[Display configuration in /dev/chassis location form]' \
 			'-v[Verbose information]' \
 			'-x[Show only unhealthy pools]' \
+			'-T[timestamp]:value:(u d)' \
 			'*::pool name:_zfs_pool'
 		;;
 
@@ -156,6 +170,7 @@
 
 	(online)
 		_arguments \
+			'-e[Expand device to use all available space]' \
 			':pool name:_zfs_pool' \
 			'*:virtual device:_files'
 		;;
@@ -202,12 +217,15 @@
 			'(-d)*-c[Use cache file]:cache file:_files' \
 			'(-c)*-d[Search for devices or files in directory]:directory:_files -/' \
 			'-f[Force import]' \
+			'-l[Display configuration in /dev/chassis location form]' \
+			'-m[Ignore missing log devices]' \
 			'-R[Alternate root]:alternate root:_files -/' \
 			'-o[Set pool or dataset property]:property:_values -s , "property" $create_properties_dataset $rw_props' \
 			- set1 \
 			'*:pool name or id:_zfs_pool' \
 			'::new pool name:' \
 			- set2 \
+			'-N[Do not mount any filesystems]' \
 			'-a[All pools]'
 		;;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Unix/Type/_zfs_dataset	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,32 @@
+#autoload
+
+local -a type paths_allowed typearg datasetlist expl
+local expl_type
+
+zparseopts -D -E t+:=type p=paths_allowed
+
+[[ -n $type[(r)fs] ]]   && typearg=( filesystem )
+[[ -n $type[(r)vol] ]]  && typearg=( $typearg volume )
+[[ -n $type[(r)snap] ]] && typearg=( $typearg snapshot )
+if [[ -n $typearg ]]; then
+	typearg=( -t ${(j:,:)typearg} )
+# We know we're in zfs list if paths_allowed is non-empty.
+elif [[ -n $opt_args[-t] && ${#paths_allowed} -gt 0 ]]; then
+	typearg=( -t $opt_args[-t] )
+fi
+
+if [[ ${#paths_allowed} -gt 0 && $PREFIX == /* ]]; then
+	_path_files
+	return
+fi
+
+datasetlist=( ${="$(zfs list -H -o name $typearg)":#no datasets available} )
+
+expl_type=${typearg[2,-1]//,/\/}
+if [[ -n $type[(r)mtpt] ]]; then
+	mlist=( ${="$(zfs list -H -o mountpoint $typearg)":#no mountpoints available} )
+	datasetlist=( $datasetlist $mlist )
+	expl_type="$expl_type/mountpoint"
+fi
+
+_wanted dataset expl "$expl_type" _multi_parts "[email protected]" -q / datasetlist
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zsh/Completion/Unix/Type/_zfs_keysource_props	Wed Jul 20 16:57:37 2011 -0700
@@ -0,0 +1,15 @@
+#autoload
+
+local -a suf
+local expl
+
+compset -S ",*" || suf=(-S ,)
+if compset -P 1 "*,"; then
+	_alternative "zfs-keylocator-prompt:\"prompt\" locator:(prompt)" \
+		"zfs-keylocator-file:file locator:_path_files" \
+		"zfs-keylocator-pkcs11:PKCS#11 locator: " \
+		"zfs-keylocator-https:HTTPS URL locator: "
+else
+	_description format expl "keysource format"
+	compadd $suf -q "$expl[@]" "[email protected]" raw hex passphrase
+fi
--- a/components/zsh/zsh.p5m	Wed Jul 20 13:54:22 2011 -0700
+++ b/components/zsh/zsh.p5m	Wed Jul 20 16:57:37 2011 -0700
@@ -485,14 +485,20 @@
 file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_dladm
 file \
+    path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_dtrace
+file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_dumpadm
 file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_flowadm
 file \
+    path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_fmadm
+file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_gcore
 file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_inetadm
 file \
+    path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_ipadm
+file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_netstat
 file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_pfexec
@@ -519,6 +525,10 @@
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_svcs_fmri
 file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_zlogin
+file \
+    path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_zoneadm
+file \
+    path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Solaris/_zones
 file path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Unix/_a2ps
 file path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Unix/_aap
 file path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Unix/_ant
@@ -921,6 +931,8 @@
 file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Unix/_zfs_dataset
 file \
+    path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Unix/_zfs_keysource_props
+file \
     path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Unix/_zfs_pool
 file path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Unix/_zip
 file path=usr/share/zsh/$(COMPONENT_VERSION)/functions/Completion/Unix/_zpool