(command.CommandList children: [ (command.ShFunction name: _smf_complete_fmri body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'cur='> (DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_VarLike 'prefix='> (DQ ($ Id.VSub_Number '$2'))} ) (C {<local>} {<cur_prefix>} {<fmri>} {<Id.Lit_VarLike 'fmri_list='> (DQ )}) (C {<local>} {<exact_mode>} {<pattern>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {($ Id.VSub_DollarName '$prefix') <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {($ Id.VSub_DollarName '$prefix')} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cur) op: assign_op.PlusEqual rhs: {(DQ <'/'>)} spids: [137] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pattern) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$cur') <'*'>)} spids: [143] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:exact_mode) op: assign_op.Equal rhs: {<1>} spids: [150] ) ] ) ] spids: [104 120] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pattern) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$prefix') <'*/'> ($ Id.VSub_DollarName '$cur') <'*'> ) } spids: [157] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cur_prefix) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name cur> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: { (DQ (braced_var_sub token: <Id.VSub_Name cur> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPound '##'> arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>} ) ) ) } ) ) ) } spids: [170] ) ] ) (command.ForEach iter_name: fmri iter_words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple words: [{<svcs>} {<-H>} {<-o>} {<FMRI>} {(DQ ($ Id.VSub_DollarName '$pattern'))}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (C {<local>} {<fmri_part_list>} {<fmri_part>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$exact_mode'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fmri) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name fmri> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Pound '#'> arg_word: {($ Id.VSub_DollarName '$prefix') <Id.Lit_Slash '/'>} ) ) } spids: [238] ) ] ) (command.Sentence child: (C {<local>} {<Id.Lit_VarLike 'OIFS='> (DQ ($ Id.VSub_DollarName '$IFS'))} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: assign_op.Equal rhs: {(DQ <'/'>)} spids: [268] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<set>} {<-->} {($ Id.VSub_DollarName '$fmri')}) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OIFS'))} spids: [281] ) ] ) (command.Case to_match: {($ Id.VSub_Pound '$#')} arms: [ (case_arm pat_list: [{<1>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fmri_part_list) op: assign_op.Equal rhs: {(DQ <' '> ($ Id.VSub_Number '$1'))} spids: [297] ) ] ) ] spids: [294 295 302 -1] ) (case_arm pat_list: [{<2>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fmri_part_list) op: assign_op.Equal rhs: { (DQ <' '> ($ Id.VSub_Number '$2') <' '> ($ Id.VSub_Number '$1') <'/'> ($ Id.VSub_Number '$2') ) } spids: [308] ) ] ) ] spids: [305 306 317 -1] ) (case_arm pat_list: [{<3>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fmri_part_list) op: assign_op.Equal rhs: { (DQ <' '> ($ Id.VSub_Number '$3') <' '> ($ Id.VSub_Number '$2') <'/'> ($ Id.VSub_Number '$3') <' '> ($ Id.VSub_Number '$1') <'/'> ($ Id.VSub_Number '$2') <'/'> ($ Id.VSub_Number '$3') ) } spids: [323] ) ] ) ] spids: [320 321 338 -1] ) (case_arm pat_list: [{<4>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fmri_part_list) op: assign_op.Equal rhs: { (DQ <' '> ($ Id.VSub_Number '$4') <' '> ($ Id.VSub_Number '$3') <'/'> ($ Id.VSub_Number '$4') <' '> ($ Id.VSub_Number '$2') <'/'> ($ Id.VSub_Number '$3') <'/'> ($ Id.VSub_Number '$4') <' '> ($ Id.VSub_Number '$1') <'/'> ($ Id.VSub_Number '$2') <'/'> ($ Id.VSub_Number '$3') <'/'> ($ Id.VSub_Number '$4') ) } spids: [344] ) ] ) ] spids: [341 342 367 -1] ) ] ) ] spids: [222 235] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fmri_part_list) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$fmri'))} spids: [376] ) ] ) ] ) (command.ForEach iter_name: fmri_part iter_words: [{($ Id.VSub_DollarName '$fmri_part_list')}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$fmri_part'))} right: {($ Id.VSub_DollarName '$cur') <Id.Lit_Other '*'>} ) ) (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) ] ) (C {<local>} {<Id.Lit_VarLike 'first_part='> (braced_var_sub token: <Id.VSub_Name fmri_part> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Pound '#'> arg_word: {($ Id.VSub_DollarName '$cur_prefix')} ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:first_part) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$cur_prefix') (braced_var_sub token: <Id.VSub_Name first_part> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPercent '%%'> arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>} ) ) } spids: [434] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ ($ Id.VSub_DollarName '$first_part'))} right: {(DQ ($ Id.VSub_DollarName '$fmri_part'))} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:first_part) op: assign_op.PlusEqual rhs: {(DQ <'/'>)} spids: [460] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fmri_list) op: assign_op.PlusEqual rhs: {(DQ <' '> ($ Id.VSub_DollarName '$first_part'))} spids: [466] ) ] ) ] ) ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{($ Id.VSub_DollarName '$fmri_list')}] ) } spids: [480] ) ] ) (C {<local>} {<Id.Lit_VarLike 'i='> (braced_var_sub token: <Id.VSub_Name COMPREPLY> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Arith_Star) ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_gt left: {($ Id.VSub_DollarName '$i')} right: {<0>} ) ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <Id.VSub_Name COMPREPLY> bracket_op: (bracket_op.ArrayIndex expr: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Id.Arith_DMinus child: <Id.Lit_ArithVarLike i> ) ) } ) ) ) } right: {<Id.Lit_Other '*'> <'/'>} ) ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$i')} right: {<0>} ) ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: { (DQ (braced_var_sub token: <Id.VSub_Name COMPREPLY> bracket_op: (bracket_op.ArrayIndex expr: {($ Id.VSub_DollarName '$i')} ) ) ) } right: { (DQ (braced_var_sub token: <Id.VSub_Name COMPREPLY> bracket_op: (bracket_op.ArrayIndex expr: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 1>} ) ) } ) ) ) } ) ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDMinus child: <Id.Lit_ArithVarLike i> ) ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {($ Id.VSub_DollarName '$i')} right: {<0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<_smf_complete_fmri>} { (DQ (braced_var_sub token: <Id.VSub_Name COMPREPLY> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>}) ) ) } {(DQ ($ Id.VSub_DollarName '$prefix'))} ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [623 636] ) ] ) ] spids: [517 554] ) ] ) (C {<local>} {<Id.Lit_VarLike 'colonprefixes='> (braced_var_sub token: <Id.VSub_Name cur> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: { (DQ (braced_var_sub token: <Id.VSub_Name cur> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPound '##'> arg_word: {<Id.Lit_Other '*'> <':'>} ) ) ) } ) ) } ) (C {<local>} {<Id.Lit_VarLike 'i='> (braced_var_sub token: <Id.VSub_Name COMPREPLY> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Arith_Star) ) } ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Id.Arith_DMinus child: <Id.Lit_ArithVarLike i> ) ) } {<-ge>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: COMPREPLY index: {($ Id.VSub_DollarName '$i')} ) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name COMPREPLY> bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName '$i')}) suffix_op: (suffix_op.Unary tok: <Id.VOp1_Pound '#'> arg_word: {(DQ ($ Id.VSub_DollarName '$colonprefixes'))} ) ) } spids: [728] ) ] ) ] ) ) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _svcadm body: (BraceGroup children: [ (C {<local>} {<cur>} {<prev>} {<words>} {<cword>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<_init_completion>} {<-n>} {<Id.Lit_Colon ':'>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (C {<local>} {<Id.Lit_VarLike 'command_list='> (DQ <'enable disable restart refresh clear mark milestone'>) } ) (C {<local>} {<command>} {<i>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 1>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: {($ Id.VSub_DollarName '$cword')} ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike i> ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (braced_var_sub token: <Id.VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike i> ) ) } right: { (word_part.ExtGlob op: <Id.ExtGlob_At '@('> arms: [ {<enable>} {<disable>} {<restart>} {<refresh>} {<clear>} {<mark>} {<milestone>} ] ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike i> ) ) } spids: [859] ) ] ) ] spids: [824 856] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$command'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name cur)} right: {<-> <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(DQ <-v>)} {<-->} {(${ Id.VSub_Name cur)} ) ) } ] ) } spids: [911] ) ] ) ] spids: [891 908] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(DQ ($ Id.VSub_DollarName '$command_list'))} {<-->} {(${ Id.VSub_Name cur)} ) ) } ] ) } spids: [936] ) ] ) ] ) ] spids: [875 888] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name cur)} right: {<-> <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$command'))} arms: [ (case_arm pat_list: [{<enable>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(DQ <'-r -s -t'>)} {<-->} {(${ Id.VSub_Name cur)} ) ) } ] ) } spids: [996] ) ] ) ] spids: [992 993 1016 -1] ) (case_arm pat_list: [{<disable>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(DQ <'-s -t'>)} {<-->} {(${ Id.VSub_Name cur)} ) ) } ] ) } spids: [1023] ) ] ) ] spids: [1019 1020 1043 -1] ) (case_arm pat_list: [{<mark>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(DQ <'-I -t'>)} {<-->} {(${ Id.VSub_Name cur)} ) ) } ] ) } spids: [1050] ) ] ) ] spids: [1046 1047 1070 -1] ) (case_arm pat_list: [{<milestone>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(DQ <-d>)} {<-->} {(${ Id.VSub_Name cur)} ) ) } ] ) } spids: [1077] ) ] ) ] spids: [1073 1074 1097 -1] ) ] ) ] spids: [964 980] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$command'))} right: {(DQ <mark>)} ) ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ ($ Id.VSub_DollarName '$prev'))} right: { (word_part.ExtGlob op: <Id.ExtGlob_At '@('> arms: [{<degraded>} {<maintenance>}] ) } ) ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(DQ <'degraded maintenance'>)} {<-->} {(${ Id.VSub_Name cur)} ) ) } ] ) } spids: [1144] ) ] ) ] spids: [1106 1141] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$command'))} right: {(DQ <milestone>)} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<_smf_complete_fmri>} {(DQ (${ Id.VSub_Name cur))} {(DQ <'svc:/milestone'>)} ) ] spids: [1166 1183] ) ] else_action: [ (C {<_smf_complete_fmri>} {(DQ (${ Id.VSub_Name cur))} {(DQ <'svc:'>)}) ] ) ] ) ] ) ] ) ) (C {<complete>} {<-F>} {<_svcadm>} {<svcadm>}) ] ) ] )