(command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _mtx body: (BraceGroup children: [ (C {<local>} {<cur>} {<prev>} {<words>} {<cword>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<_init_completion>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (C {<local>} {<options>} {<tapes>} {<drives>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:options) op: assign_op.Equal rhs: { (DQ <'-f nobarcode invert noattach --version inquiry noattach '> <' inventory status load unload eepos first last next'> ) } spids: [43] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tapes) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (command.Simple words: [{<mtx>} {<status>}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<awk>} {(SQ <'/Storage Element [0-9]+:Full/ { printf "%s ", $3 }'>)}) ] negated: F ) ) } spids: [52] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tapes) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name tapes> suffix_op: (suffix_op.PatSub pat:{<':Full'>} replace_mode:Id.Lit_Slash) ) } spids: [73] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:drives) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (command.Simple words: [{<mtx>} {<status>}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<awk>} { (SQ < '/Data Transfer Element [0-9]+:(Full|Empty)/ { printf "%s ", $4 }' > ) } ) ] negated: F ) ) } spids: [83] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:drives) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name drives> suffix_op: (suffix_op.PatSub pat:{<':Full'>} replace_mode:Id.Lit_Slash) ) } spids: [104] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:drives) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name drives> suffix_op: (suffix_op.PatSub pat:{<':Empty'>} replace_mode:Id.Lit_Slash) ) } spids: [113] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_gt left: {($ Id.VSub_DollarName '$cword')} right: {<1>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{<load>}] 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 '$tapes'))} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ) } ] ) } spids: [150] ) ] ) ] spids: [146 147 174 -1] ) (case_arm pat_list: [{<unload>} {<first>} {<last>} {<next>}] 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 '$drives'))} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ) } ] ) } spids: [187] ) ] ) ] spids: [177 184 211 -1] ) (case_arm pat_list: [{<-f>}] action: [(C {<true>})] spids: [214 215 221 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<true>})] spids: [224 225 231 -1] ) ] ) ] spids: [123 136] ) ] 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 '$options'))} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ) } ] ) } spids: [240] ) ] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (C {<complete>} {<-F>} {<_mtx>} {<mtx>}) ] )