components/zsh/Completion/Solaris/Type/_svcs_fmri
changeset 510 53bd319b010e
parent 429 02007d525e89
child 837 3496f33edfbb
equal deleted inserted replaced
509:07ee58881cb3 510:53bd319b010e
    31 		# (^|.*/)$PREFIX.*
    31 		# (^|.*/)$PREFIX.*
    32 		fmri_abbrevs=( ${(M)_smf_fmris:#((#s)|*[/:])$PREFIX*} )
    32 		fmri_abbrevs=( ${(M)_smf_fmris:#((#s)|*[/:])$PREFIX*} )
    33 
    33 
    34 		# Go through the remaining elements and remove the characters
    34 		# Go through the remaining elements and remove the characters
    35 		# in front of $PREFIX.
    35 		# in front of $PREFIX.
    36 		for ((i = 1; i < $#fmri_abbrevs; i++ )); do
    36 		for ((i = 1; i <= $#fmri_abbrevs; i++ )); do
    37 			# Either one of these will work, but they're too
    37 			# Either one of these will work, but they're too
    38 			# greedy, preventing multiple matches below.
    38 			# greedy, preventing multiple matches below.
    39 			fmri_abbrevs[i]=${${fmri_abbrevs[i]}/((#s)|*[\/:])(#b)($PREFIX*)/$match[1]}
    39 			fmri_abbrevs[i]=${${fmri_abbrevs[i]}/((#s)|*[\/:])(#b)($PREFIX*)/$match[1]}
    40 			#fmri_abbrevs[i]=${${(M)${fmri_abbrevs[i]}:#(#b)((#s)|*/)$PREFIX*}#$match[1]}
    40 			#fmri_abbrevs[i]=${${(M)${fmri_abbrevs[i]}:#(#b)((#s)|*/)$PREFIX*}#$match[1]}
    41 		done
    41 		done