(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GREP_OPTIONS) op: Equal rhs: {(DQ ("--color=never"))} spids: [9] ) ] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:GREP_COLORS) op:Equal rhs:{(SQ )} spids:[17])] spids: [17] ) (FuncDef name: asdf_version body: (BraceGroup children: [ (C {(cat)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [30 32] ) (/VERSION) ) } ) ] spids: [24] ) spids: [20 23] ) (FuncDef name: asdf_dir body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$ASDF_DIR"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:current_script_path) op: Equal rhs: { (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [65 70] ) } spids: [64] ) ] spids: [62] ) (C {(export)} {(ASDF_DIR)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ASDF_DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Sentence child: (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} { (DQ ($ VSub_Name "$current_script_path" ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [87 93] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [83 95] ) ) } ) (C {(exit)}) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) (C {(pwd)}) ] ) left_token: <Left_CommandSub "$("> spids: [79 104] ) } spids: [78] ) ] spids: [78] ) ] spids: [-1 59] ) ] spids: [-1 107] ) (C {(echo)} {(DQ ($ VSub_Name "$ASDF_DIR"))}) ] spids: [43] ) spids: [39 42] ) (FuncDef name: asdf_repository_url body: (BraceGroup children: [(C {(echo)} {(DQ ("https://github.com/asdf-vm/asdf-plugins.git"))})] spids: [124] ) spids: [120 123] ) (FuncDef name: get_install_path body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin) op: Equal rhs: {($ VSub_Number "$1")} spids: [145] ) ] spids: [143] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:install_type) op: Equal rhs: {($ VSub_Number "$2")} spids: [151] ) ] spids: [149] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: {($ VSub_Number "$3")} spids: [157] ) ] spids: [155] ) (C {(mkdir)} {(-p)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [166 168] ) (/installs/) (${ VSub_Name plugin) ) } ) (If arms: [ (if_arm cond: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$install_type"))} {(Lit_Other "=")} {(DQ (version))} {(Lit_Other "]")} ) ] action: [ (C {(echo)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [200 202] ) (/installs/) (${ VSub_Name plugin) (/) (${ VSub_Name version) ) } ) ] spids: [-1 194] ) ] else_action: [ (C {(echo)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [220 222] ) (/installs/) (${ VSub_Name plugin) (/) (${ VSub_Name install_type) (-) (${ VSub_Name version) ) } ) ] spids: [214 238] ) ] spids: [140] ) spids: [136 139] ) (FuncDef name: list_installed_versions body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [252] ) ] spids: [250] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:plugin_path) op:Equal spids:[258])] spids: [256] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:plugin_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(get_plugin_path)} {(DQ ($ VSub_Name "$plugin_name"))})] ) left_token: <Left_CommandSub "$("> spids: [262 268] ) } spids: [261] ) ] spids: [261] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:plugin_installs_path) op:Equal spids:[274])] spids: [272] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:plugin_installs_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [278 280] ) (/installs/) (${ VSub_Name plugin_name) } spids: [277] ) ] spids: [277] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-d)} {(DQ ($ VSub_Name "$plugin_installs_path"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (ForEach iter_name: install iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [ {(ls)} {(-d)} {(DQ (${ VSub_Name plugin_installs_path)) (/) (Lit_Other "*") (/) } ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [328] ) ] ) ] ) left_token: <Left_CommandSub "$("> spids: [314 330] ) } ] do_arg_iter: False body: (DoGroup children: [(C {(basename)} {(DQ ($ VSub_Name "$install"))})] spids: [333 343] ) spids: [313 331] ) ] spids: [-1 301] ) ] spids: [-1 346] ) ] spids: [247] ) spids: [243 246] ) (FuncDef name: check_if_plugin_exists body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Number 1))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(C {(display_error)} {(DQ ("No plugin given"))}) (C {(exit)} {(1)})] spids: [-1 377] ) ] spids: [-1 392] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [405 407] ) (/plugins/) ($ VSub_Number "$1") ) } {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(C {(display_error)} {(DQ ("No such plugin"))}) (C {(exit)} {(1)})] spids: [-1 415] ) ] spids: [-1 430] ) ] spids: [355] ) spids: [351 354] ) (FuncDef name: check_if_version_exists body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [444] ) ] spids: [442] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: {($ VSub_Number "$2")} spids: [450] ) ] spids: [448] ) (C {(check_if_plugin_exists)} {(DQ ($ VSub_Name "$plugin_name"))}) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:install_path) op:Equal spids:[465])] spids: [463] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(find_install_path)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$version"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [469 479] ) } spids: [468] ) ] spids: [468] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$version"))} {(KW_Bang "!") (Lit_Other "=")} {(DQ (system))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} {(DQ ($ VSub_Name "$install_path"))} {(Lit_Other "]")} ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (C {(display_error)} { (DQ ("version ") ($ VSub_Name "$version") (" is not installed for ") ($ VSub_Name "$plugin_name") ) } ) (C {(exit)} {(1)}) ] spids: [-1 515] ) ] spids: [-1 533] ) ] spids: [439] ) spids: [435 438] ) (FuncDef name: get_plugin_path body: (BraceGroup children: [ (C {(echo)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [548 550] ) (/plugins/) ($ VSub_Number "$1") ) } ) ] spids: [542] ) spids: [538 541] ) (FuncDef name: display_error body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number "$1"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[567])] ) ] spids: [562] ) spids: [558 561] ) (FuncDef name: get_version_in_dir body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [586] ) ] spids: [584] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:search_path) op: Equal rhs: {($ VSub_Number "$2")} spids: [592] ) ] spids: [590] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:legacy_filenames) op: Equal rhs: {($ VSub_Number "$3")} spids: [598] ) ] spids: [596] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:asdf_version) op:Equal spids:[605])] spids: [603] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:asdf_version) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(parse_asdf_version_file)} {(DQ ($ VSub_Name "$search_path") (/.tool-versions))} {(DQ ($ VSub_Name "$plugin_name"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [609 620] ) } spids: [608] ) ] spids: [608] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$asdf_version"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} { (DQ ($ VSub_Name "$asdf_version") ("|") ($ VSub_Name "$search_path") (/.tool-versions) ) } ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [-1 637] ) ] spids: [-1 655] ) (ForEach iter_name: filename iter_words: [{($ VSub_Name "$legacy_filenames")}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:legacy_version) op:Equal spids:[673])] spids: [671] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:legacy_version) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(parse_legacy_version_file)} { (DQ ($ VSub_Name "$search_path") (/) ($ VSub_Name "$filename") ) } {(DQ ($ VSub_Name "$plugin_name"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [677 689] ) } spids: [676] ) ] spids: [676] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$legacy_version"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} { (DQ ($ VSub_Name "$legacy_version") ("|") ($ VSub_Name "$search_path") (/) ($ VSub_Name "$filename") ) } ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [-1 706] ) ] spids: [-1 725] ) ] spids: [668 728] ) spids: [664 666] ) ] spids: [581] ) spids: [577 580] ) (FuncDef name: find_version body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [742] ) ] spids: [740] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:search_path) op: Equal rhs: {($ VSub_Number "$2")} spids: [748] ) ] spids: [746] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:version) op:Equal spids:[755])] spids: [753] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(get_version_from_env)} {(DQ ($ VSub_Name "$plugin_name"))})] ) left_token: <Left_CommandSub "$("> spids: [759 765] ) } spids: [758] ) ] spids: [758] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$version"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} {(DQ ($ VSub_Name "$version"))}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [-1 781] ) ] spids: [-1 796] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:plugin_path) op:Equal spids:[802])] spids: [800] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:plugin_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(get_plugin_path)} {(DQ ($ VSub_Name "$plugin_name"))})] ) left_token: <Left_CommandSub "$("> spids: [806 812] ) } spids: [805] ) ] spids: [805] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:legacy_config) op:Equal spids:[817])] spids: [815] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:legacy_config) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(get_asdf_config_value)} {(DQ (legacy_version_file))})] ) left_token: <Left_CommandSub "$("> spids: [821 827] ) } spids: [820] ) ] spids: [820] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:legacy_list_filenames_script) op: Equal spids: [832] ) ] spids: [830] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:legacy_list_filenames_script) op: Equal rhs: {(DQ (${ VSub_Name plugin_path) (/bin/list-legacy-filenames))} spids: [835] ) ] spids: [835] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:legacy_filenames) op: Equal rhs: {(DQ )} spids: [846] ) ] spids: [844] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$legacy_config"))} {(Lit_Other "=")} {(DQ (yes))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(-f)} {(DQ ($ VSub_Name "$legacy_list_filenames_script"))} {(Lit_Other "]")} ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:legacy_filenames) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(bash)} {(DQ ($ VSub_Name "$legacy_list_filenames_script"))}) ] ) left_token: <Left_CommandSub "$("> spids: [885 891] ) } spids: [884] ) ] spids: [884] ) ] spids: [-1 881] ) ] spids: [-1 894] ) (While cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$search_path"))} {(KW_Bang "!") (Lit_Other "=")} {(DQ (/))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(get_version_in_dir)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$search_path"))} {(DQ ($ VSub_Name "$legacy_filenames"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [920 934] ) } spids: [919] ) ] spids: [919] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$version"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} {(DQ ($ VSub_Name "$version"))}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [-1 950] ) ] spids: [-1 965] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:search_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ ($ VSub_Name "$search_path"))})] ) left_token: <Left_CommandSub "$("> spids: [969 975] ) } spids: [968] ) ] spids: [968] ) ] spids: [916 978] ) ) (C {(get_version_in_dir)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$HOME"))} {(DQ ($ VSub_Name "$legacy_filenames"))} ) ] spids: [737] ) spids: [733 736] ) (FuncDef name: get_version_from_env body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [1009] ) ] spids: [1007] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:upcase_name) op:Equal spids:[1015])] spids: [1013] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:upcase_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$plugin_name"))}) (C {(tr)} {(SQ <"[:lower:]">)} {(SQ <"[:upper:]">)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [1019 1037] ) } spids: [1018] ) ] spids: [1018] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version_env_var) op: Equal rhs: {(DQ (ASDF_) (${ VSub_Name upcase_name) (_VERSION))} spids: [1042] ) ] spids: [1040] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (BracedVarSub token: <VSub_Name version_env_var> prefix_op: VSub_Bang spids: [1055 1058] ) } spids: [1054] ) ] spids: [1052] ) (C {(echo)} {(DQ ($ VSub_Name "$version"))}) ] spids: [1004] ) spids: [999 1003] ) (FuncDef name: find_install_path body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [1079] ) ] spids: [1077] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: {($ VSub_Number "$2")} spids: [1085] ) ] spids: [1083] ) (SimpleCommand words: [{(read)} {(-a)} {(version_info)}] redirects: [ (Redir op_id: Redir_TLess fd: -1 arg_word: {(DQ ($ VSub_Name "$version"))} spids: [1105] ) ] more_env: [(env_pair name:IFS val:{(SQ <":">)} spids:[1094])] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$version"))} {(Lit_Other "=")} {(DQ (system))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(C {(echo)} {(DQ )})] spids: [-1 1130] ) (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: [1144 1149] ) ) } {(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: [1168 1173] ) ) } spids: [1166] ) ] spids: [1164] ) (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: [1181 1186] ) ) } spids: [1179] ) ] spids: [1177] ) (C {(get_install_path)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$install_type"))} {(DQ ($ VSub_Name "$version"))} ) ] spids: [1139 1161] ) (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: [1210 1215] ) ) } {(Lit_Other "=")} {(DQ (path))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:install_type) op: Equal rhs: {(DQ (path))} spids: [1248] ) ] spids: [1246] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: {(DQ (path))} spids: [1256] ) ] spids: [1254] ) (C {(echo)} { (DQ (BracedVarSub token: <VSub_Name version_info> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 1)})) spids: [1265 1270] ) ) } ) ] spids: [1205 1227] ) ] else_action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:install_type) op: Equal rhs: {(DQ (version))} spids: [1279] ) ] spids: [1277] ) (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: [1289 1294] ) ) } spids: [1287] ) ] spids: [1285] ) (C {(get_install_path)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$install_type"))} {(DQ ($ VSub_Name "$version"))} ) ] spids: [1274 1313] ) ] spids: [1074] ) spids: [1070 1073] ) (FuncDef name: get_executable_path body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [1327] ) ] spids: [1325] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: {($ VSub_Number "$2")} spids: [1333] ) ] spids: [1331] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:executable_path) op: Equal rhs: {($ VSub_Number "$3")} spids: [1339] ) ] spids: [1337] ) (C {(check_if_version_exists)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$version"))} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$version"))} {(Lit_Other "=")} {(DQ (system))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$PATH"))}) (C {(sed)} {(-e)} { (DQ ("s|") ($ VSub_Name "$ASDF_DIR") ("/shims||g; s|::|:|g") ) } ) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [1377 1395] ) } spids: [1376] ) ] spids: [1376] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cmd) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(basename)} {(DQ ($ VSub_Name "$executable_path"))})] ) left_token: <Left_CommandSub "$("> spids: [1399 1405] ) } spids: [1398] ) ] spids: [1398] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cmd_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(which)} {(DQ ($ VSub_Name "$cmd"))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [1419] ) ] more_env: [ (env_pair name: PATH val: {($ VSub_Name "$path")} spids: [1410] ) ] ) ] ) left_token: <Left_CommandSub "$("> spids: [1409 1421] ) } spids: [1408] ) ] spids: [1408] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [-1 1441] ) ] spids: [-1 1449] ) (C {(echo)} {(DQ ($ VSub_Name "$cmd_path"))}) ] spids: [-1 1373] ) ] else_action: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:install_path) op:Equal spids:[1464])] spids: [1462] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(find_install_path)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$version"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [1468 1478] ) } spids: [1467] ) ] spids: [1467] ) (C {(echo)} {(DQ (${ VSub_Name install_path)) (/) (DQ (${ VSub_Name executable_path))}) ] spids: [1459 1496] ) ] spids: [1322] ) spids: [1318 1321] ) (FuncDef name: parse_asdf_version_file body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:file_path) op: Equal rhs: {($ VSub_Number "$1")} spids: [1510] ) ] spids: [1508] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$2")} spids: [1516] ) ] spids: [1514] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {(DQ ($ VSub_Name "$file_path"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:version) op:Equal spids:[1539])] spids: [1537] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(grep)} {(DQ (${ VSub_Name plugin_name) (" "))} {(DQ ($ VSub_Name "$file_path"))} ) (C {(sed)} {(-e)} {(DQ ("s/^") (${ VSub_Name plugin_name) (" //"))} ) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [1543 1570] ) } spids: [1542] ) ] spids: [1542] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$version"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} {(DQ ($ VSub_Name "$version"))}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [-1 1586] ) ] spids: [-1 1601] ) ] spids: [-1 1534] ) ] spids: [-1 1604] ) ] spids: [1505] ) spids: [1501 1504] ) (FuncDef name: parse_legacy_version_file body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:file_path) op: Equal rhs: {($ VSub_Number "$1")} spids: [1618] ) ] spids: [1616] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$2")} spids: [1624] ) ] spids: [1622] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:plugin_path) op:Equal spids:[1631])] spids: [1629] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:plugin_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(get_plugin_path)} {(DQ ($ VSub_Name "$plugin_name"))})] ) left_token: <Left_CommandSub "$("> spids: [1635 1641] ) } spids: [1634] ) ] spids: [1634] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:parse_legacy_script) op:Equal spids:[1646])] spids: [1644] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:parse_legacy_script) op: Equal rhs: {(DQ (${ VSub_Name plugin_path) (/bin/parse-legacy-file))} spids: [1649] ) ] spids: [1649] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {(DQ ($ VSub_Name "$file_path"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {(DQ ($ VSub_Name "$parse_legacy_script"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(bash)} {(DQ ($ VSub_Name "$parse_legacy_script"))} {(DQ ($ VSub_Name "$file_path"))} ) ] spids: [-1 1688] ) ] else_action: [(C {(cat)} {(DQ ($ VSub_Name "$file_path"))})] spids: [1702 1712] ) ] spids: [-1 1672] ) ] spids: [-1 1715] ) ] spids: [1613] ) spids: [1609 1612] ) (FuncDef name: get_preset_version_for body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [1729] ) ] spids: [1727] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:search_path) op:Equal spids:[1735])] spids: [1733] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:search_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [1739 1741] ) } spids: [1738] ) ] spids: [1738] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:version_and_path) op:Equal spids:[1746])] spids: [1744] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:version_and_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(find_version)} {(DQ ($ VSub_Name "$plugin_name"))} {(DQ ($ VSub_Name "$search_path"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [1750 1760] ) } spids: [1749] ) ] spids: [1749] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:version) op:Equal spids:[1765])] spids: [1763] ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(cut)} {(-d)} {(SQ <"|">)} {(-f)} {(1)}] redirects: [ (Redir op_id: Redir_TLess fd: -1 arg_word: {(DQ ($ VSub_Name "$version_and_path"))} spids: [1782] ) ] ) ] ) left_token: <Left_CommandSub "$("> spids: [1769 1787] ) } spids: [1768] ) ] spids: [1768] ) terminator: <Op_Semi ";"> ) (C {(echo)} {(DQ ($ VSub_Name "$version"))}) ] spids: [1724] ) spids: [1720 1723] ) (FuncDef name: get_asdf_config_value_from_file body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:config_path) op: Equal rhs: {($ VSub_Number "$1")} spids: [1810] ) ] spids: [1808] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:key) op: Equal rhs: {($ VSub_Number "$2")} spids: [1816] ) ] spids: [1814] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} {(DQ ($ VSub_Name "$config_path"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [-1 1836] ) ] spids: [-1 1844] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:result) op:Equal spids:[1850])] spids: [1848] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:result) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(grep)} {(-E)} { (DQ ("^") (EscapedLiteralPart token:<Lit_EscapedChar "\\s">) ("*") ($ VSub_Name "$key") (EscapedLiteralPart token:<Lit_EscapedChar "\\s">) ("*=") ) } {(DQ ($ VSub_Name "$config_path"))} ) (C {(awk)} {(-F)} {(SQ <"=">)} {(SQ <"{ gsub(/ /, \"\", $2); print $2 }">)} ) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [1854 1885] ) } spids: [1853] ) ] spids: [1853] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$result"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(C {(echo)} {(DQ ($ VSub_Name "$result"))})] spids: [-1 1901] ) ] spids: [-1 1911] ) ] spids: [1805] ) spids: [1801 1804] ) (FuncDef name: get_asdf_config_value body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:key) op: Equal rhs: {($ VSub_Number "$1")} spids: [1925] ) ] spids: [1923] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:config_path) op: Equal rhs: { (BracedVarSub token: <VSub_Name AZDF_CONFIG_FILE> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(DQ ($ VSub_Name "$HOME") (/.asdfrc))} ) spids: [1932 1939] ) } spids: [1931] ) ] spids: [1929] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:default_config_path) op: Equal rhs: { (BracedVarSub token: <VSub_Name AZDF_CONFIG_DEFAULT_FILE> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [1949 1951] ) (/defaults) ) } ) spids: [1945 1954] ) } spids: [1944] ) ] spids: [1942] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:result) op:Equal spids:[1960])] spids: [1958] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:result) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(get_asdf_config_value_from_file)} {(DQ ($ VSub_Name "$config_path"))} {(DQ ($ VSub_Name "$key"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [1964 1974] ) } spids: [1963] ) ] spids: [1963] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$result"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(C {(echo)} {(DQ ($ VSub_Name "$result"))})] spids: [-1 1991] ) ] else_action: [ (C {(get_asdf_config_value_from_file)} {(DQ ($ VSub_Name "$default_config_path"))} {(DQ ($ VSub_Name "$key"))} ) ] spids: [2001 2015] ) ] spids: [1920] ) spids: [1916 1919] ) (FuncDef name: repository_needs_update body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:update_file_dir) op:Equal spids:[2029])] spids: [2027] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:update_file_dir) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [2034 2036] ) (/tmp) ) } spids: [2032] ) ] spids: [2032] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:update_file_name) op:Equal spids:[2043])] spids: [2041] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:update_file_name) op: Equal rhs: {(DQ (repo-updated))} spids: [2046] ) ] spids: [2046] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:find_result) op:Equal spids:[2058])] spids: [2056] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:find_result) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(find)} {(DQ ($ VSub_Name "$update_file_dir"))} {(-name)} {(DQ ($ VSub_Name "$update_file_name"))} {(-type)} {(f)} {(-mtime)} {(Lit_Other "+") (1)} {(-print)} ) ] ) left_token: <Left_CommandSub "$("> spids: [2062 2085] ) } spids: [2061] ) ] spids: [2061] ) (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$find_result"))} {(Lit_Other "]")}) ] spids: [2024] ) spids: [2020 2023] ) (FuncDef name: initialize_or_update_repository body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:repository_url) op:Equal spids:[2110])] spids: [2108] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:repository_path) op:Equal spids:[2115])] spids: [2113] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:repository_url) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(asdf_repository_url)})]) left_token: <Left_CommandSub "$("> spids: [2120 2122] ) } spids: [2119] ) ] spids: [2119] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:repository_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [2126 2128] ) (/repository) } spids: [2125] ) ] spids: [2125] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} {(DQ ($ VSub_Name "$repository_path"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} {(DQ ("initializing plugin repository..."))}) (C {(git)} {(clone)} {(DQ ($ VSub_Name "$repository_url"))} {(DQ ($ VSub_Name "$repository_path"))} ) ] spids: [-1 2148] ) (if_arm cond: [(Sentence child:(C {(repository_needs_update)}) terminator:<Op_Semi ";">)] action: [ (C {(echo)} {(DQ ("updating plugin repository..."))}) (Subshell child: (AndOr children: [ (C {(cd)} {(DQ ($ VSub_Name "$repository_path"))}) (AndOr children: [ (C {(git)} {(fetch)}) (C {(git)} {(reset)} {(--hard)} {(origin/master)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [2186 2208] ) ] spids: [2171 2176] ) ] spids: [-1 2211] ) (C {(mkdir)} {(-p)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [2220 2222] ) (/tmp) ) } ) (C {(touch)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [2230 2232] ) (/tmp/repo-updated) ) } ) ] spids: [2105] ) spids: [2101 2104] ) (FuncDef name: get_plugin_source_url body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:plugin_name) op: Equal rhs: {($ VSub_Number "$1")} spids: [2248] ) ] spids: [2246] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:plugin_config) op:Equal spids:[2254])] spids: [2252] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:plugin_config) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(asdf_dir)})]) left_token: <Left_CommandSub "$("> spids: [2260 2262] ) (/repository/plugins/) ($ VSub_Name "$plugin_name") ) } spids: [2258] ) ] spids: [2258] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {(DQ ($ VSub_Name "$plugin_config"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (Pipeline children: [ (C {(grep)} {(DQ (repository))} {(DQ ($ VSub_Name "$plugin_config"))}) (C {(awk)} {(-F) (SQ <"=">)} {(SQ <"{print $2}">)}) (C {(sed)} {(SQ <"s/ //">)}) ] negated: False ) ] spids: [-1 2283] ) ] spids: [-1 2318] ) ] spids: [2243] ) spids: [2239 2242] ) ] )