(command.CommandList children: [ (command.FuncDef name: getopts_long body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-n)} { (DQ (word_part.BracedVarSub token: <VSub_Name ZSH_VERSION> suffix_op: (suffix_op.StringUnary op_id:VTest_Plus arg_word:{(z)}) ) ) } {(Lit_Other ']')} ) (C {(emulate)} {(-L)} {(sh)}) ] ) (command.AndOr ops: [Op_DPipe] children: [(C {(unset)} {(OPTLERR)} {(OPTLARG)}) (C {(Lit_Other ':')})] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$OPTLIND'))} arms: [ (case_arm pat_list: [ {(DQ )} {(0)} {(Lit_Other '*') (Lit_Other '[') (KW_Bang '!') (0-9) (Lit_Other ']') (Lit_Other '*')} ] action: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTLIND) op:Equal rhs:{(1)})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTLPENDING) op:Equal rhs:(word.EmptyWord))] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Pound '$#'))} {(-lt)} {(2)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [{(printf)} {(SQ <'getopts_long: not enough arguments\\n'>)}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (command.SimpleCommand words: [ {(command)} {(eval)} { (SQ <'\n'> <' case "$2" in\n'> <' *[!a-zA-Z_0-9]*|""|[0-9]*)\n'> <'\tprintf >&2 "getopts_long: invalid variable name: \\`%s'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar "\\'">) (SQ <'\\n" "$2"\n'> <'\treturn 1\n'> <'\t;;\n'> <' esac'>) } ] more_env: [(env_pair name:LC_ALL val:{(C)})] ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [ {(Lit_Other ':') (Lit_Other ':') (Lit_Other '*')} {(Lit_Other '*') (Lit_Other ':') (Lit_Other ':') (Lit_Other ':') (Lit_Other '*')} {(Lit_Other '*') (-) (Lit_Other '*')} ] action: [ (command.SimpleCommand words: [ {(printf)} { (DQ ('getopts_long: invalid option specification: ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) ("%s'") (Lit_Other '\\') (n) ) } {(DQ ($ VSub_Number '$1'))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (C {(set)} {(4)} {(DQ ($ VSub_At '$@'))}) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(Lit_Other ':')}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(-gt)} {(DQ ($ VSub_Pound '$#'))} {(Lit_Other ']')} ) (command.BraceGroup children: [ (C {(eval)} {(SQ <'set -- "${'>) (DQ ($ VSub_Number '$1')) (SQ <'}" "$@"'>)} ) (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')} ) (command.ControlFlow token: <ControlFlow_Break break> ) ] ) (C {(Lit_Other '[')} { (DQ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_Number '$2')}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ) } {(-gt)} {(DQ ($ VSub_Pound '$#'))} {(Lit_Other ']')} ) ] ) ] ) ] action: [ (command.SimpleCommand words: [ {(printf)} { (DQ ( 'getopts_long: long option specifications must end in an empty argument' ) (Lit_Other '\\') (n) ) } ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (C {(eval)} {(SQ <'set -- "${'>) (DQ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_Number '$2')}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ) (SQ <'}" "$@"'>) } ) (command.Case to_match: {(DQ ($ VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(Lit_Other '*') (Lit_Other '=') (Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} { (DQ ('getopts_long: invalid long option name: ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) ("%s'") (Lit_Other '\\') (n) ) } {(DQ ($ VSub_Number '$2'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list:[{(0)} {(no_argument)}]) (case_arm pat_list:[{(1)} {(required_argument)}]) (case_arm pat_list:[{(2)} {(optional_argument)}]) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} { (DQ ('getopts_long: invalid long option type: ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) ("%s'") (Lit_Other '\\') (n) ) } {(DQ ($ VSub_Number '$1'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (C {(eval)} { (DQ ('shift 3; set ') (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_Number '$3')}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ) (SQ <' "$@"'>) } ) ] ) ) (C {(shift)}) (C {(eval)} { (DQ ('shift; set ') (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) right: (arith_expr.ArithWord w:{($ VSub_DollarName '$OPTLIND')}) ) ) ) (SQ <' "$@"'>) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_DollarName '$OPTLPENDING'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(-le)} {(DQ ($ VSub_Pound '$#'))} {(Lit_Other ']')} ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (C {(eval)} {(SQ <'set -- "${'>) (DQ ($ VSub_Number '$1')) (SQ <'}" "$@"'>)}) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(--)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLIND) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$OPTLIND')} ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (case_arm pat_list: [{(--) (Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLIND) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$OPTLIND')} ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) ] ) (case_arm pat_list: [{(-) (Lit_Other '?') (Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLPENDING) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id: VOp1_Pound arg_word: {(-)} ) ) ) } ) ] ) (C {(shift)}) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$OPTLPENDING'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name OPTLPENDING> suffix_op: (suffix_op.StringUnary op_id: VOp1_Percent arg_word: { (DQ (word_part.BracedVarSub token: <VSub_Name OPTLPENDING> suffix_op: (suffix_op.StringUnary op_id: VOp1_Pound arg_word: {('?')} ) ) ) } ) ) } ) ] ) (C {(set)} {(--)} {(DQ ($ VSub_DollarName '$OPTLARG'))} {(DQ ($ VSub_At '$@'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLPENDING) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name OPTLPENDING> suffix_op: (suffix_op.StringUnary op_id:VOp1_Pound arg_word:{('?')}) ) ) } ) ] ) (C {(unset)} {(OPTLARG)}) (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$OPTLPENDING'))} {(Lit_Other ']')} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLIND) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$OPTLIND')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(Lit_Other '[') (-) (Lit_Other ':') (Lit_Other ']')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLERR) op: Equal rhs: { (DQ ('bad option: ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) (-) ($ VSub_Number '$1') ("'") ) } ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$3'))} arms: [ (case_arm pat_list: [{(Lit_Other ':') (Lit_Other '*')}] action: [ (C {(eval)} {(DQ ($ VSub_Number '$4') ('=:'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_DollarName '$OPTLERR'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (C {(eval)} {(DQ ($ VSub_Number '$4') ("='?'"))}) ] ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Case to_match: {(DQ ($ VSub_Number '$3'))} arms: [ (case_arm pat_list: [ {(Lit_Other '*') (DQ ($ VSub_Number '$1')) (Lit_Other ':') (Lit_Other ':') (Lit_Other '*') } ] action: [ (C {(eval)} { (DQ ($ VSub_Number '$4') ('=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (1) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$OPTLPENDING'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: {(DQ ($ VSub_DollarName '$OPTLPENDING'))} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLPENDING) op: Equal rhs: (word.EmptyWord) ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLIND) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$OPTLIND')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) } ) ] ) ] ) ] ) ] ) (case_arm pat_list: [ {(Lit_Other '*') (DQ ($ VSub_Number '$1')) (Lit_Other ':') (Lit_Other '*') } ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$OPTLPENDING'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: {(DQ ($ VSub_DollarName '$OPTLPENDING'))} ) ] ) (C {(eval)} { (DQ ($ VSub_Number '$4') ('=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (1) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLPENDING) op: Equal rhs: (word.EmptyWord) ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLIND) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$OPTLIND')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) } ) ] ) ] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (DQ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_Number '$2')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 2)} ) ) ) ) } {(-gt)} {(DQ ($ VSub_Pound '$#'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLERR) op: Equal rhs: { (DQ ('option ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) (-) ($ VSub_Number '$1') ("' requires an argument") ) } ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$3'))} arms: [ (case_arm pat_list: [{(Lit_Other ':') (Lit_Other '*')}] action: [ (C {(eval)} {(DQ ($ VSub_Number '$4') ('=:'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_DollarName '$OPTLERR'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (C {(eval)} {(DQ ($ VSub_Number '$4') ("='?'"))}) ] ) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLIND) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$OPTLIND')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) } ) ] ) (C {(eval)} { (DQ ('OPTLARG=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{') (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_Number '$2')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 2)} ) ) ) ('}') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (C {(eval)} { (DQ ($ VSub_Number '$4') ('=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (1) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [ {(Lit_Other '*') (DQ ($ VSub_Number '$1')) (Lit_Other '*')} ] action: [ (C {(eval)} { (DQ ($ VSub_Number '$4') ('=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (1) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLERR) op: Equal rhs: { (DQ ('bad option: ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) (-) ($ VSub_Number '$1') ("'") ) } ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$3'))} arms: [ (case_arm pat_list: [{(Lit_Other ':') (Lit_Other '*')}] action: [ (C {(eval)} {(DQ ($ VSub_Number '$4') ('=:'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_DollarName '$OPTLERR'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (C {(eval)} {(DQ ($ VSub_Number '$4') ("='?'"))}) ] ) ] ) ] ) ] ) ] ) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLPENDING) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (C {(shift)}) (C {(set)} {(6)} { (DQ (word_part.BracedVarSub token: <VSub_Name OPTLPENDING> suffix_op: (suffix_op.StringUnary op_id:VOp1_Pound arg_word:{(--)}) ) ) } {(DQ ($ VSub_At '$@'))} ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTLPENDING) op:Equal rhs:(word.EmptyWord))] ) (command.WhileUntil keyword: <KW_While while> cond: [ (C {(eval)} {(SQ <'set -- "${'>) (DQ ($ VSub_Number '$1')) (SQ <'}" "$@"'>)}) (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')}) ] body: (command.DoGroup children: [ (command.Case to_match: { (DQ (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id: VOp1_DPercent arg_word: {('=*')} ) ) ) } arms: [ (case_arm pat_list: [{(DQ ($ VSub_Number '$1'))}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLPENDING) op: Equal rhs: {(EXACT)} ) ] ) (command.ControlFlow token: <ControlFlow_Break break> ) ] ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [ { (DQ (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id: VOp1_DPercent arg_word: {('=*')} ) ) ) (Lit_Other '*') } ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$OPTLPENDING'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DPipe Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$OPTLPENDING'))} {(Lit_Other '=')} {(AMBIGUOUS)} {(Lit_Other ']')} ) (C {(eval)} {(SQ <'[ "${'>) (DQ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$OPTLPENDING')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) ) (SQ <'}" = "$1" ]'>) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLPENDING) op: Equal rhs: {(AMBIGUOUS)} ) ] ) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLPENDING) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} ) ] ) ] ) ] ) ] ) (C {(eval)} { (DQ ('shift 2; set ') (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_Number '$2')}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) (' ') ) (SQ <'"$@"'>) } ) ] ) ) (command.Case to_match: {(DQ ($ VSub_DollarName '$OPTLPENDING'))} arms: [ (case_arm pat_list: [{(AMBIGUOUS)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLERR) op: Equal rhs: { (DQ ('option ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) (--) (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id: VOp1_DPercent arg_word: {('=*')} ) ) ("' is ambiguous") ) } ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$5'))} arms: [ (case_arm pat_list: [{(Lit_Other ':') (Lit_Other '*')}] action: [ (C {(eval)} {(DQ ($ VSub_Number '$6') ('=:'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id: VOp1_DPercent arg_word: {('=*')} ) ) ) } ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_DollarName '$OPTLERR'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (C {(eval)} {(DQ ($ VSub_Number '$6') ("='?'"))}) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTLPENDING) op:Equal rhs:(word.EmptyWord))] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (case_arm pat_list: [{(EXACT)}] action: [ (C {(eval)} {(SQ <'set "${'>) (DQ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_Number '$2')}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ) (SQ <'}" "$@"'>) } ) ] ) (case_arm pat_list: [{(DQ )}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLERR) op: Equal rhs: { (DQ ('bad option: ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) (--) (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id: VOp1_DPercent arg_word: {('=*')} ) ) ("'") ) } ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$5'))} arms: [ (case_arm pat_list: [{(Lit_Other ':') (Lit_Other '*')}] action: [ (C {(eval)} {(DQ ($ VSub_Number '$6') ('=:'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id: VOp1_DPercent arg_word: {('=*')} ) ) ) } ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_DollarName '$OPTLERR'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (C {(eval)} {(DQ ($ VSub_Number '$6') ("='?'"))}) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTLPENDING) op:Equal rhs:(word.EmptyWord))] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(shift)}) (C {(eval)} {(SQ <'set "${'>) (DQ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$OPTLPENDING')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) (SQ <'}" "${'>) (DQ ($ VSub_DollarName '$OPTLPENDING')) (SQ <'}" "$@"'>) } ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTLPENDING) op:Equal rhs:(word.EmptyWord))] ) (command.Case to_match: {(DQ ($ VSub_Number '$4'))} arms: [ (case_arm pat_list: [{(Lit_Other '*') (Lit_Other '=') (Lit_Other '*')}] action: [ (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(1)} {(required_argument)} {(2)} {(optional_argument)}] action: [ (C {(eval)} { (DQ ($ VSub_Number '$7') ('=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (2) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Number 4> suffix_op: (suffix_op.StringUnary op_id: VOp1_Pound arg_word: {('*=')} ) ) ) } ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLERR) op: Equal rhs: { (DQ ('option ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) (--) ($ VSub_Number '$2') ("' doesn't allow an argument") ) } ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$6'))} arms: [ (case_arm pat_list: [{(Lit_Other ':') (Lit_Other '*')}] action: [ (C {(eval)} {(DQ ($ VSub_Number '$7') ('=:'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_DollarName '$OPTLERR'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (C {(eval)} {(DQ ($ VSub_Number '$7') ("='?'"))}) ] ) ] ) ] ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(1)} {(required_argument)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (DQ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_Number '$5')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 5)} ) ) ) ) } {(-gt)} {(DQ ($ VSub_Pound '$#'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLERR) op: Equal rhs: { (DQ ('option ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\`'> ) (--) ($ VSub_Number '$2') ("' requires an argument") ) } ) ] ) (command.Case to_match: {(DQ ($ VSub_Number '$6'))} arms: [ (case_arm pat_list: [{(Lit_Other ':') (Lit_Other '*')}] action: [ (C {(eval)} {(DQ ($ VSub_Number '$7') ('=:'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLARG) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_DollarName '$OPTLERR'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (C {(eval)} {(DQ ($ VSub_Number '$7') ("='?'"))}) ] ) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTLIND) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$OPTLIND')} ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) (C {(eval)} { (DQ ('OPTLARG=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{') (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_Number '$5')}) right: (arith_expr.ArithWord w:{(Lit_Digits 5)}) ) ) ('}') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (C {(eval)} { (DQ ($ VSub_Number '$7') ('=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (2) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(eval)} { (DQ ($ VSub_Number '$7') ('=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (2) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) ] ) ] ) ] ) ] ) ] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$test_getopts_long'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.FuncDef name: test_getopts_long body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expected) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) (assign_pair lhs: (lhs_expr.LhsName name:had) op: Equal rhs: (word.EmptyWord) ) ] ) (C {(shift)}) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTLIND) op:Equal rhs:{(1)})] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:err) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Sentence child: (C {(set)} {(Lit_Other '+') (x)}) terminator: <Op_Semi ';'> ) (command.SimpleCommand words: [{(getopts_long)} {(DQ ($ VSub_At '$@'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) ] ) ] ) left_token: <Left_CommandSub '$('> ) ) } ) ] ) (command.Sentence child: (command.SimpleCommand words: [{(getopts_long)} {(DQ ($ VSub_At '$@'))}] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(eval)} { (DQ ('opt=') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ($ VSub_Number '$2') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:had) op: Equal rhs: { (DQ ($ VSub_DollarName '$had') ('|') ($ VSub_DollarName '$opt') ('@') (word_part.BracedVarSub token: <VSub_Name OPTLARG> suffix_op: (suffix_op.StringUnary op_id: VTest_Hyphen arg_word: {(unset)} ) ) ('@') (word_part.BracedVarSub token: <VSub_Name OPTLIND> suffix_op: (suffix_op.StringUnary op_id: VTest_Hyphen arg_word: {(unset)} ) ) ('@') (word_part.BracedVarSub token: <VSub_Name OPTLERR> suffix_op: (suffix_op.StringUnary op_id: VTest_Hyphen arg_word: {(unset)} ) ) ('@') ($ VSub_DollarName '$err') ) } ) ] ) ] ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:had) op: Equal rhs: { (DQ ($ VSub_DollarName '$had') ('|') (word_part.BracedVarSub token: <VSub_Name OPTLIND> suffix_op: (suffix_op.StringUnary op_id: VTest_Hyphen arg_word: {(unset)} ) ) ('|') ($ VSub_DollarName '$err') ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$had'))} {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$expected'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(PASS)})] ) ] else_action: [ (C {(echo)} {(FAIL)}) (C {(printf)} {(SQ <'Expected: %s\\n Got: %s\\n'>)} {(DQ ($ VSub_DollarName '$expected'))} {(DQ ($ VSub_DollarName '$had'))} ) ] ) ] ) ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.SimpleCommand words: [{(read)} {(-r)} {(c)}] more_env: [(env_pair name:IFS val:(word.EmptyWord))] ) (command.SimpleCommand words: [{(read)} {(-r)} {(e)}] more_env: [(env_pair name:IFS val:(word.EmptyWord))] ) ] ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(printf)} {(SQ <'+ %-72s '>)} {(DQ ($ VSub_DollarName '$c'))}) (C {(eval)} { (DQ ('test_getopts_long ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (e) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (' ') ($ VSub_DollarName '$c') ) } ) ] ) redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 3233 stdin_parts: [ (': a\n') ('|1|getopts_long: long option specifications must end in an empty argument\n') (':a opt "" -a\n') ('|a@unset@2@unset@|2|\n') (':a opt "" -a b\n') ('|a@unset@2@unset@|2|\n') (':a opt "" -a -a\n') ('|a@unset@2@unset@|a@unset@3@unset@|3|\n') (':a opt "" -ab\n') ("|a@unset@1@unset@|:@b@2@bad option: `-b'@|2|\n") (':a: opt "" -ab\n') ('|a@b@2@unset@|2|\n') (':a: opt "" -a b\n') ('|a@b@3@unset@|3|\n') (':a: opt "" -a -a\n') ('|a@-a@3@unset@|3|\n') (':a: opt "" -a\n') ("|:@a@2@option `-a' requires an argument@|2|\n") (':a:: opt "" -a\n') ('|a@unset@2@unset@|2|\n') (':a:: opt "" -ab\n') ('|a@b@2@unset@|2|\n') (':a:: opt "" -a b\n') ('|a@unset@2@unset@|2|\n') (':ab: opt "" -ab c\n') ('|a@unset@1@unset@|b@c@3@unset@|3|\n') (':a:: opt "" -a -a\n') ('|a@unset@2@unset@|a@unset@3@unset@|3|\n') (':a:: opt "" -:a:\n') ("|:@:@1@bad option: `-:'@|a@:@2@unset@|2|\n") (':= opt ""\n') ('|1|\n') (':: opt ""\n') ("|1|getopts_long: invalid option specification: `::'\n") (': opt ""\n') ('|1|\n') (':a:a opt "" -a\n') ("|:@a@2@option `-a' requires an argument@|2|\n") (':a::a opt "" -a\n') ('|a@unset@2@unset@|2|\n') (':ab:c:: opt "" -abc -cba -bac\n') ('|a@unset@1@unset@|b@c@2@unset@|c@ba@3@unset@|b@ac@4@unset@|4|\n') (': opt abc 0 "" --abc\n') ('|abc@unset@2@unset@|2|\n') (': opt abc no_argument "" --abc\n') ('|abc@unset@2@unset@|2|\n') (': opt abc no_argument "" --abc=foo\n') ("|:@abc@2@option `--abc' doesn't allow an argument@|2|\n") (': opt abc no_argument "" --abc foo\n') ('|abc@unset@2@unset@|2|\n') (': opt abc 1 "" --abc=foo\n') ('|abc@foo@2@unset@|2|\n') (': opt abc required_argument "" --abc foo\n') ('|abc@foo@3@unset@|3|\n') (': opt abc required_argument "" --abc=\n') ('|abc@@2@unset@|2|\n') (': opt abc required_argument "" --abc\n') ("|:@abc@2@option `--abc' requires an argument@|2|\n") (': opt abc 2 "" --abc\n') ('|abc@unset@2@unset@|2|\n') (': opt abc optional_argument "" --abc=\n') ('|abc@@2@unset@|2|\n') (': opt abc optional_argument "" --abc=foo\n') ('|abc@foo@2@unset@|2|\n') (': opt abc optional_argument "" --abc --abc\n') ('|abc@unset@2@unset@|abc@unset@3@unset@|3|\n') (': opt abc 0 abcd 0 "" --abc\n') ('|abc@unset@2@unset@|2|\n') (': opt abc 0 abd 0 "" --ab\n') ("|:@ab@2@option `--ab' is ambiguous@|2|\n") (': opt abc 0 abcd 0 "" --ab\n') ("|:@ab@2@option `--ab' is ambiguous@|2|\n") (': opt abc 0 abc 1 "" --ab\n') ('|abc@unset@2@unset@|2|\n') (': opt abc 0 abc 1 "" --abc\n') ('|abc@unset@2@unset@|2|\n') (': opt abc 0 abc 1 "" --ab\n') ('|abc@unset@2@unset@|2|\n') (': opt abc 0 acd 0 "" --ab\n') ('|abc@unset@2@unset@|2|\n') ( ':abc:d:e::f:: opt ab 0 ac 1 bc 2 cd 1 cde 2 "" -abcdef -a -f -c --a --a= --b=foo -fg\n' ) ( "|a@unset@1@unset@|b@unset@1@unset@|c@def@2@unset@|a@unset@3@unset@|f@unset@4@unset@|c@--a@6@unset@|:@a@7@option `--a' is ambiguous@|bc@foo@8@unset@|f@g@9@unset@|9|\n" ) ('a opt "" -a\n') ('|a@unset@2@unset@|2|\n') ('a opt "" -a b\n') ('|a@unset@2@unset@|2|\n') ('a opt "" -a -a\n') ('|a@unset@2@unset@|a@unset@3@unset@|3|\n') ('a opt "" -ab\n') ("|a@unset@1@unset@|?@unset@2@bad option: `-b'@bad option: `-b'|2|\n") ('a: opt "" -ab\n') ('|a@b@2@unset@|2|\n') ('a: opt "" -a b\n') ('|a@b@3@unset@|3|\n') ('a: opt "" -a -a\n') ('|a@-a@3@unset@|3|\n') ('a: opt "" -a\n') ( "|?@unset@2@option `-a' requires an argument@option `-a' requires an argument|2|\n" ) ('a:: opt "" -a\n') ('|a@unset@2@unset@|2|\n') ('a:: opt "" -ab\n') ('|a@b@2@unset@|2|\n') ('a:: opt "" -a b\n') ('|a@unset@2@unset@|2|\n') ('a:: opt "" -a -a\n') ('|a@unset@2@unset@|a@unset@3@unset@|3|\n') ('a:: opt "" -:a:\n') ("|?@unset@1@bad option: `-:'@bad option: `-:'|a@:@2@unset@|2|\n") ('= opt ""\n') ('|1|\n') (': opt ""\n') ('|1|\n') ('\'\' opt ""\n') ('|1|\n') ('a:a opt "" -a\n') ( "|?@unset@2@option `-a' requires an argument@option `-a' requires an argument|2|\n" ) ('a::a opt "" -a\n') ('|a@unset@2@unset@|2|\n') ('ab:c:: opt "" -abc -cba -bac\n') ('|a@unset@1@unset@|b@c@2@unset@|c@ba@3@unset@|b@ac@4@unset@|4|\n') ('\'\' opt abc 0 "" --abc\n') ('|abc@unset@2@unset@|2|\n') ('\'\' opt abc no_argument "" --abc\n') ('|abc@unset@2@unset@|2|\n') ('\'\' opt abc no_argument "" --abc=foo\n') ( "|?@unset@2@option `--abc' doesn't allow an argument@option `--abc' doesn't allow an argument|2|\n" ) ('\'\' opt abc no_argument "" --abc foo\n') ('|abc@unset@2@unset@|2|\n') ('\'\' opt abc 1 "" --abc=foo\n') ('|abc@foo@2@unset@|2|\n') ('\'\' opt abc required_argument "" --abc foo\n') ('|abc@foo@3@unset@|3|\n') ('\'\' opt abc required_argument "" --abc=\n') ('|abc@@2@unset@|2|\n') ('\'\' opt abc required_argument "" --abc\n') ( "|?@unset@2@option `--abc' requires an argument@option `--abc' requires an argument|2|\n" ) ('\'\' opt abc 2 "" --abc\n') ('|abc@unset@2@unset@|2|\n') ('\'\' opt abc optional_argument "" --abc=\n') ('|abc@@2@unset@|2|\n') ('\'\' opt abc optional_argument "" --abc=foo\n') ('|abc@foo@2@unset@|2|\n') ('\'\' opt abc optional_argument "" --abc --abc\n') ('|abc@unset@2@unset@|abc@unset@3@unset@|3|\n') ('\'\' opt abc 0 abcd 0 "" --abc\n') ('|abc@unset@2@unset@|2|\n') ('\'\' opt abc 0 abd 0 "" --ab\n') ("|?@unset@2@option `--ab' is ambiguous@option `--ab' is ambiguous|2|\n") ('\'\' opt abc 0 abcd 0 "" --ab\n') ("|?@unset@2@option `--ab' is ambiguous@option `--ab' is ambiguous|2|\n") ('\'\' opt abc 0 abc 1 "" --ab\n') ('|abc@unset@2@unset@|2|\n') ('\'\' opt abc 0 abc 1 "" --abc\n') ('|abc@unset@2@unset@|2|\n') ('\'\' opt abc 0 abc 1 "" --ab\n') ('|abc@unset@2@unset@|2|\n') ('\'\' opt abc 0 acd 0 "" --ab\n') ('|abc@unset@2@unset@|2|\n') ( 'abc:d:e::f:: opt ab 0 ac 1 bc 2 cd 1 cde 2 "" -abcdef -a -f -c --a --a= --b=foo -fg\n' ) ( "|a@unset@1@unset@|b@unset@1@unset@|c@def@2@unset@|a@unset@3@unset@|f@unset@4@unset@|c@--a@6@unset@|?@unset@7@option `--a' is ambiguous@option `--a' is ambiguous|bc@foo@8@unset@|f@g@9@unset@|9|\n" ) (": '' '' a\n") ("|1|getopts_long: invalid variable name: `'\n") (": 1a ''\n") ("|1|getopts_long: invalid variable name: `1a'\n") ('- a\n') ("|1|getopts_long: invalid option specification: `-'\n") (":a::a:abcd o ab 1 abc 1 abd 1 abe 1 abc 2 '' -aa --ab 1 --abc\n") ( "|a@a@2@unset@|ab@1@4@unset@|:@abc@5@option `--abc' requires an argument@|5|\n" ) (':\n') ('|1|getopts_long: not enough arguments\n') ( "'\\[$' o -- 0 ' ' 1 '#' required_argument '' '-\\\\\\[$' --\\ =a --\\#=\\$\\$\n" ) ( '|\\@unset@1@unset@|\\@unset@1@unset@|\\@unset@1@unset@|[@unset@1@unset@|$@unset@2@unset@| @a@3@unset@|#@$$@4@unset@|4|\n' ) (': o a 1 b 2 c\n') ('|1|getopts_long: long option specifications must end in an empty argument\n') (': o a 1 b 2\n') ('|1|getopts_long: long option specifications must end in an empty argument\n') (": o a 1 b 2 c 3 '' --c\n") ("|1|getopts_long: invalid long option type: `3'\n") ('": " o " " 1 \'\' "- " "-- =1"\n') ('| @unset@1@unset@| @unset@2@unset@| @1@3@unset@|3|\n') (": o a 1 '' --c\n") ("|:@c@2@bad option: `--c'@|2|\n") (": o a 1 '' --c=foo\n") ("|:@c@2@bad option: `--c'@|2|\n") (": o ab 1 ac 1 ad 1 a 1 '' --a=1\n") ('|a@1@2@unset@|2|\n') ] ) ] ) ] ) ] ) ] )