(command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _mtx body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[16]) op: Equal spids: [16] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[18]) op: Equal spids: [18] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[20]) op: Equal spids: [20] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[22]) op: Equal spids: [22] ) ] spids: [14] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options spids:[35]) op: Equal spids: [35] ) (assign_pair lhs: (lhs_expr.LhsName name:tapes spids:[37]) op: Equal spids: [37] ) (assign_pair lhs: (lhs_expr.LhsName name:drives spids:[39]) op: Equal spids: [39] ) ] spids: [33] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options spids:[43]) op: Equal rhs: { (DQ ('-f nobarcode invert noattach --version inquiry noattach ') (' inventory status load unload eepos first last next') ) } spids: [43] ) ] spids: [43] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tapes spids:[52]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.SimpleCommand words: [{(mtx)} {(status)}] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(awk)} {(SQ <'/Storage Element [0-9]+:Full/ { printf "%s ", $3 }'>)} ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [53 70] ) } spids: [52] ) ] spids: [52] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tapes spids:[73]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name tapes> suffix_op: (suffix_op.PatSub pat: {(':Full')} replace_mode: Lit_Slash spids: [76] ) spids: [74 79] ) } spids: [73] ) ] spids: [73] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:drives spids:[83]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.SimpleCommand words: [{(mtx)} {(status)}] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(awk)} { (SQ < '/Data Transfer Element [0-9]+:(Full|Empty)/ { printf "%s ", $4 }' > ) } ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [84 101] ) } spids: [83] ) ] spids: [83] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:drives spids:[104]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name drives> suffix_op: (suffix_op.PatSub pat: {(':Full')} replace_mode: Lit_Slash spids: [107] ) spids: [105 110] ) } spids: [104] ) ] spids: [104] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:drives spids:[113]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name drives> suffix_op: (suffix_op.PatSub pat: {(':Empty')} replace_mode: Lit_Slash spids: [116] ) spids: [114 119] ) } spids: [113] ) ] spids: [113] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_gt left: {($ VSub_DollarName '$cword')} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Case to_match: {($ VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(load)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[150]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$tapes'))} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [153 169] ) } ] ) } spids: [150] ) ] spids: [150] ) ] spids: [146 147 174 16777215] ) (case_arm pat_list: [{(unload)} {(first)} {(last)} {(next)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[187]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$drives'))} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [190 206] ) } ] ) } spids: [187] ) ] spids: [187] ) ] spids: [177 184 211 16777215] ) (case_arm pat_list: [{(-f)}] action: [(C {(true)})] spids: [214 215 221 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(true)})] spids: [224 225 231 16777215] ) ] spids: [139 143 234] ) ] spids: [16777215 136] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[240]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$options'))} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [243 259] ) } ] ) } spids: [240] ) ] spids: [240] ) ] spids: [237 264] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [11] ) spids: [7 10] ) (C {(complete)} {(-F)} {(_mtx)} {(mtx)}) ] )