(CommandList children: [ (FuncDef name: where_command body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [9] ) ] spids: [7] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:full_version) op: Equal rhs: {($ VSub_Number "$2")} spids: [15] ) ] spids: [13] ) (C {(check_if_plugin_exists)} {(DQ ($ VSub_Name "$plugin_name"))}) (SimpleCommand words: [{(read)} {(-r)} {(-a)} {(version_info)}] redirects: [ (Redir op_id: Redir_TLess fd: -1 arg_word: {(DQ ($ VSub_Name "$full_version"))} spids: [40] ) ] more_env: [(env_pair name:IFS val:{(SQ <":">)} spids:[27])] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} { (DQ (BracedVarSub token: <VSub_Name version_info> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [52 57] ) ) } {(Lit_Other "=")} {(DQ (ref))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:install_type) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name version_info> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [76 81] ) ) } spids: [74] ) ] spids: [72] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name version_info> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 1)})) spids: [89 94] ) ) } spids: [87] ) ] spids: [85] ) ] spids: [-1 69] ) ] else_action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:install_type) op: Equal rhs: {(DQ (version))} spids: [103] ) ] spids: [101] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name version_info> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [113 118] ) ) } spids: [111] ) ] spids: [109] ) ] spids: [98 122] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:install_path) op:Equal spids:[128])] spids: [126] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(get_install_path)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$install_type"))} {(DQ ($ VSub_Name "$version"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [132 146] ) } spids: [131] ) ] spids: [131] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-d)} {(DQ ($ VSub_Name "$install_path"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(C {(echo)} {(DQ ($ VSub_Name "$install_path"))}) (C {(exit)} {(0)})] spids: [-1 163] ) ] else_action: [(C {(echo)} {(DQ ("Version not installed"))}) (C {(exit)} {(1)})] spids: [178 193] ) ] spids: [4] ) spids: [0 3] ) ] )