Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 2/2] _zfs: complete jail/unjail subcommands on freebsd



---
 Completion/Unix/Command/_zfs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs
index 04a92e6..f3869da 100644
--- a/Completion/Unix/Command/_zfs
+++ b/Completion/Unix/Command/_zfs
@@ -20,6 +20,8 @@ _zfs() {
 		"diff" "key" "help"
 	)
 
+  [[ $OSTYPE == freebsd<7->.* ]] && subcmds+=(jail unjail)
+
 	share_nfs_ro_properties=(
 		"share.nfs.all"
 	)
@@ -533,6 +535,12 @@ _zfs() {
 			':filesystem or volume:_zfs_dataset -t fs -t vol'
 		;;
 
+	("jail"|"unjail")
+		_arguments \
+			'1: : _jails' \
+			'2:filesystem:_zfs_dataset -t fs'
+		;;
+
 	("help")
 		_arguments -A "-*" \
 			- set1 \
-- 
2.5.1



Messages sorted by: Reverse Date, Date, Thread, Author