(CommandList children: [ (FuncDef name: usage body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("usage: cdexec [-q|--quiet] <directory> <command> <command args ...>\n") ( " cdexec [-q|--quiet] -t|--temp TEMPLATE <command> <command args ...>\n" ) ("\n") ("cdexec is a utility which changes current working directory, replaces all\n") ("occurrences of '") (EscapedLiteralPart token:<Lit_EscapedChar "\\$">) (EscapedLiteralPart token:<Lit_EscapedChar "\\{">) (PWD) (EscapedLiteralPart token:<Lit_EscapedChar "\\}">) ("' from the command line with the previous PWD\n") ("and then execs that command line.\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [22] ) ] ) ] spids: [17] ) spids: [13 16] ) (FuncDef name: _cdexec body: (BraceGroup children: [ (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:_ROOT) op: Equal rhs: {(DQ ($ VSub_Name "$PWD"))} spids: [50] ) ] spids: [46] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:_QUIET) op:Equal rhs:{(DQ )} spids:[61])] spids: [59] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:_DEST) op:Equal rhs:{(DQ )} spids:[71])] spids: [69] ) (While cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ";">)] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_QUIET) op: Equal rhs: {(DQ (yes))} spids: [105] ) ] spids: [105] ) (C {(shift)}) ] spids: [97 102 114 -1] ) (case_arm pat_list: [{(-t)} {(--temp)}] action: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_DEST) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(mktemp)} {(-d)} {(DQ ($ VSub_Number "$1"))}) ] ) left_token: <Left_CommandSub "$("> spids: [130 138] ) ) } spids: [128] ) ] spids: [128] ) (C {(shift)}) ] spids: [117 122 145 -1] ) (case_arm pat_list: [{(-) (Lit_Other "*")}] action: [ (C {(echo)} {(DQ ("Unrecognized option: ") ($ VSub_Number "$1"))}) (C {(usage)}) (C {(exit)} {(1)}) ] spids: [148 150 169 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name "$_DEST"))} right: {(DQ )} ) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_DEST) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [195] ) ] spids: [195] ) (C {(shift)}) ] spids: [-1 192] ) ] spids: [-1 204] ) (ControlFlow token:<ControlFlow_Break break>) ] spids: [172 173 213 -1] ) ] spids: [88 94 216] ) ] spids: [85 219] ) ) (C {(cd)} {(DQ ($ VSub_Name "$_DEST"))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$_QUIET"))} {(Lit_Other "=")} {(DQ (yes))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [ {(exec)} { (DQ (BracedVarSub token: <VSub_At "@"> suffix_op: (PatSub pat: {(EscapedLiteralPart token:<Lit_EscapedChar "\\$">) (EscapedLiteralPart token: <Lit_EscapedChar "\\{"> ) (PWD) (EscapedLiteralPart token:<Lit_EscapedChar "\\}">) } replace: {(${ VSub_Name _ROOT)} do_all: True do_prefix: False do_suffix: False ) spids: [260 272] ) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[275])] ) ] spids: [-1 254] ) ] else_action: [ (C {(exec)} { (DQ (BracedVarSub token: <VSub_At "@"> suffix_op: (PatSub pat: {(EscapedLiteralPart token:<Lit_EscapedChar "\\$">) (EscapedLiteralPart token: <Lit_EscapedChar "\\{"> ) (PWD) (EscapedLiteralPart token:<Lit_EscapedChar "\\}">) } replace: {(${ VSub_Name _ROOT)} do_all: True do_prefix: False do_suffix: False ) spids: [286 298] ) ) } ) ] spids: [280 302] ) ] spids: [43] ) spids: [39 42] ) (C {(_cdexec)} {(DQ ($ VSub_At "$@"))}) ] )