about summary refs log tree commit diff
path: root/Completion/Solaris/Type/_be_name
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Solaris/Type/_be_name')
-rw-r--r--Completion/Solaris/Type/_be_name17
1 files changed, 6 insertions, 11 deletions
diff --git a/Completion/Solaris/Type/_be_name b/Completion/Solaris/Type/_be_name
index b25a8ff22..4b80c65f2 100644
--- a/Completion/Solaris/Type/_be_name
+++ b/Completion/Solaris/Type/_be_name
@@ -1,18 +1,13 @@
 #autoload
 
-local -a type be_names
-local name uuid activate mtpt space policy created snap
+local -a type be_names expl
 
 zparseopts -D -E -a type t+:
 
-beadm list -H | while IFS=\; read name uuid active mtpt space policy created; do
-	be_names=( $be_names $name )
-done
+be_names=( ${${(f)"$(_call_program boot-environs beadm list -H)"}%%;*} )
 
-if [[ -n $type[(r)all] ]]; then
-	beadm list -sH | while IFS=\; read name snap space policy created; do
-		be_names=( $be_names $snap )
-	done
-fi
+[[ -n $type[(r)all] ]] &&
+  be_names+=( ${${${(f)"$(_call_program boot-environs beadm list -sH)"}#*;}%%;*} )
 
-compadd "$@" - $be_names
+_description boot-environs expl 'boot environment'
+compadd "$@" "$expl[@]" -a be_names