(command.CommandList children: [ (C {(Lit_Other ':')} { (word_part.BracedVarSub token: <VSub_Name MERGE_TOOLS_DIR> suffix_op: (suffix_op.StringUnary op_id: VTest_Equals arg_word: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(--exec-path)})]) left_token: <Left_CommandSub '$('> spids: [9 13] ) (Lit_Slash /) (mergetools) } ) spids: [6 16] ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:IFS spids:[19]) op: Equal rhs: {(SQ <'\n'>)} spids: [19] ) ] spids: [19] ) (command.FuncDef name: mode_ok body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [(C {(diff_mode)})] action: [(C {(can_diff)})] spids: [16777215 38] ) (if_arm cond: [(C {(merge_mode)})] action: [(C {(can_merge)})] spids: [44 49] ) ] else_action: [(C {(false)})] spids: [55 61] ) ] spids: [30] ) spids: [25 29] ) (command.FuncDef name: is_available body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool_path spids:[74]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(translate_merge_tool_path)} {(DQ ($ VSub_Number '$1'))})] ) left_token: <Left_CommandSub '$('> spids: [75 81] ) } spids: [74] ) ] spids: [74] ) (command.SimpleCommand words: [{(type)} {(DQ ($ VSub_Name '$merge_tool_path'))}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) ] ) ] spids: [71] ) spids: [66 70] ) (command.FuncDef name: list_config_tools body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:section spids:[109]) op: Equal rhs: {($ VSub_Number '$1')} spids: [109] ) ] spids: [109] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:line_prefix spids:[113]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 2> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [114 117] ) } spids: [113] ) ] spids: [113] ) (command.Pipeline children: [ (C {(git)} {(config)} {(--get-regexp)} {($ VSub_Name '$section') (SQ <'\\..*\\.cmd'>)}) (command.WhileUntil keyword: <KW_While while> cond: [(C {(read)} {(-r)} {(key)} {(value)})] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:toolname spids:[149]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name key> suffix_op: (suffix_op.StringUnary op_id: VOp1_Pound arg_word: {($ VSub_Name '$section') (.)} ) spids: [150 155] ) } spids: [149] ) ] spids: [149] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:toolname spids:[158]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name toolname> suffix_op: (suffix_op.StringUnary op_id: VOp1_Percent arg_word: {(.cmd)} ) spids: [159 163] ) } spids: [158] ) ] spids: [158] ) (C {(printf)} {(DQ ('%s%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$line_prefix'))} {(DQ ($ VSub_Name '$toolname'))} ) ] spids: [146 184] ) ) ] negated: F ) ] spids: [106] ) spids: [101 105] ) (command.FuncDef name: show_tool_names body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:condition spids:[197]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(true)}) spids: [198 202] ) } spids: [197] ) (assign_pair lhs: (lhs_expr.LhsName name:per_line_prefix spids:[204]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 2> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [205 208] ) } spids: [204] ) (assign_pair lhs: (lhs_expr.LhsName name:preamble spids:[210]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [211 214] ) } spids: [210] ) ] spids: [197] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:not_found_msg spids:[217]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 4> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [218 221] ) } spids: [217] ) ] spids: [217] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:extra_content spids:[224]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 5> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [225 228] ) } spids: [224] ) ] spids: [224] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:shown_any spids:[232]) op: Equal rhs: (word.EmptyWord) spids: [232] ) ] spids: [232] ) (command.Pipeline children: [ (command.Subshell child: (command.AndOr ops: [Op_DAmp] children: [(C {(cd)} {(DQ ($ VSub_Name '$MERGE_TOOLS_DIR'))}) (C {(ls)})] ) spids: [235 247] ) (command.BraceGroup children: [ (command.WhileUntil keyword: <KW_While while> cond: [(C {(read)} {(toolname)})] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (command.SimpleCommand words: [{(setup_tool)} {(DQ ($ VSub_Name '$toolname'))}] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) (command.Subshell child: (C {(eval)} {(DQ ($ VSub_Name '$condition'))} {(DQ ($ VSub_Name '$toolname'))} ) spids: [278 288] ) ] ) ] action: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$preamble'))})] action: [ (C {(printf)} {(DQ ('%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$preamble'))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:preamble spids:[321]) op: Equal rhs: (word.EmptyWord) spids: [321] ) ] spids: [321] ) ] spids: [16777215 305] ) ] spids: [16777215 324] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:shown_any spids:[327]) op: Equal rhs: {(yes)} spids: [327] ) ] spids: [327] ) (C {(printf)} {(DQ ('%s%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$per_line_prefix'))} {(DQ ($ VSub_Name '$toolname'))} ) ] spids: [16777215 291] ) ] spids: [16777215 348] ) ] spids: [261 351] ) ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$extra_content'))})] action: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$preamble'))})] action: [ (C {(printf)} {(DQ ('%s'))} {(DQ ($ VSub_Name '$preamble'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:preamble spids:[402]) op: Equal rhs: (word.EmptyWord) spids: [402] ) ] spids: [402] ) ] spids: [16777215 380] ) ] spids: [16777215 405] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:shown_any spids:[408]) op: Equal rhs: {(yes)} spids: [408] ) ] spids: [408] ) (C {(printf)} {(DQ (Lit_Other '\\') ('n%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$extra_content'))} ) ] spids: [16777215 366] ) ] spids: [16777215 426] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$preamble'))}) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$not_found_msg'))}) ] ) ] action: [ (C {(printf)} {(DQ ('%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$not_found_msg'))} ) ] spids: [16777215 451] ) ] spids: [16777215 467] ) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$shown_any'))}) ] spids: [251] ) ] negated: F ) ] spids: [194] ) spids: [189 193] ) (command.FuncDef name: diff_mode body: (command.BraceGroup children: [(C {(test)} {(DQ ($ VSub_Name '$TOOL_MODE'))} {(Lit_Other '=')} {(diff)})] spids: [489] ) spids: [485 488] ) (command.FuncDef name: merge_mode body: (command.BraceGroup children: [(C {(test)} {(DQ ($ VSub_Name '$TOOL_MODE'))} {(Lit_Other '=')} {(merge)})] spids: [509] ) spids: [505 508] ) (command.FuncDef name: translate_merge_tool_path body: (command.BraceGroup children:[(C {(echo)} {(DQ ($ VSub_Number '$1'))})] spids:[530]) spids: [525 529] ) (command.FuncDef name: check_unchanged body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(test)} {(DQ ($ VSub_Name '$MERGED'))} {(-nt)} {(DQ ($ VSub_Name '$BACKUP'))}) ] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [16777215 565] ) ] else_action: [ (command.WhileUntil keyword: <KW_While while> cond: [(C {(true)})] body: (command.DoGroup children: [ (C {(echo)} {(DQ ($ VSub_Name '$MERGED') (' seems unchanged.'))}) (C {(printf)} {(DQ ('Was the merge successful [y/n]? '))}) (command.AndOr ops: [Op_DPipe] children: [ (C {(read)} {(answer)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (command.Case to_match: {(DQ ($ VSub_Name '$answer'))} arms: [ (case_arm pat_list: [{(y) (Lit_Other '*')} {(Y) (Lit_Other '*')}] action: [ (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [619 624 630 16777215] ) (case_arm pat_list: [{(n) (Lit_Other '*')} {(N) (Lit_Other '*')}] action: [ (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [633 638 644 16777215] ) ] spids: [610 616 647] ) ] spids: [581 650] ) ) ] spids: [573 653] ) ] spids: [547] ) spids: [542 546] ) (command.FuncDef name: valid_tool body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(setup_tool)} {(DQ ($ VSub_Number '$1'))}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cmd spids:[679]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(get_merge_tool_cmd)} {(DQ ($ VSub_Number '$1'))})] ) left_token: <Left_CommandSub '$('> spids: [680 686] ) } spids: [679] ) ] spids: [679] ) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$cmd'))}) ] spids: [663] ) spids: [658 662] ) (command.FuncDef name: setup_user_tool body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool_cmd spids:[708]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(get_merge_tool_cmd)} {(DQ ($ VSub_Name '$tool'))})] ) left_token: <Left_CommandSub '$('> spids: [709 715] ) } spids: [708] ) ] spids: [708] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$merge_tool_cmd'))}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (command.FuncDef name: diff_cmd body: (command.BraceGroup children: [ (command.Subshell child: (C {(eval)} {($ VSub_Name '$merge_tool_cmd')}) spids: [742 748] ) ] spids: [739] ) spids: [734 738] ) (command.FuncDef name: merge_cmd body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:trust_exit_code spids:[763]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(git)} {(config)} {(--bool)} {(DQ (mergetool.) ($ VSub_Number '$1') (.trustExitCode))} ) (C {(echo)} {(false)}) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [764 784] ) } spids: [763] ) ] spids: [763] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(DQ ($ VSub_Name '$trust_exit_code'))} {(Lit_Other '=')} {(DQ (false))} ) ] action: [ (C {(touch)} {(DQ ($ VSub_Name '$BACKUP'))}) (command.Subshell child: (C {(eval)} {($ VSub_Name '$merge_tool_cmd')}) spids: [812 818] ) (C {(check_unchanged)}) ] spids: [16777215 802] ) ] else_action: [ (command.Subshell child: (C {(eval)} {($ VSub_Name '$merge_tool_cmd')}) spids: [827 833] ) ] spids: [824 836] ) ] spids: [760] ) spids: [755 759] ) ] spids: [705] ) spids: [700 704] ) (command.FuncDef name: setup_tool body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tool spids:[852]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [852] ) ] spids: [852] ) (command.FuncDef name: can_merge body: (command.BraceGroup children: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [868] ) spids: [863 867] ) (command.FuncDef name: can_diff body: (command.BraceGroup children: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [885] ) spids: [880 884] ) (command.FuncDef name: diff_cmd body: (command.BraceGroup children: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [902] ) spids: [897 901] ) (command.FuncDef name: merge_cmd body: (command.BraceGroup children: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [919] ) spids: [914 918] ) (command.FuncDef name: translate_merge_tool_path body: (command.BraceGroup children: [(C {(echo)} {(DQ ($ VSub_Number '$1'))})] spids: [936] ) spids: [931 935] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [ (C {(test)} {(-f)} {(DQ ($ VSub_Name '$MERGE_TOOLS_DIR') (/) ($ VSub_Name '$tool'))} ) ] negated: T ) ] action: [ (C {(setup_user_tool)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {($ VSub_QMark '$?')} ) ] spids: [16777215 965] ) ] spids: [16777215 976] ) (C {(.)} {(DQ ($ VSub_Name '$MERGE_TOOLS_DIR') (/) ($ VSub_Name '$tool'))}) (C {(setup_user_tool)}) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(merge_mode)}) (command.Pipeline children: [(C {(can_merge)})] negated: T ) ] ) ] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ("error: '") ($ VSub_Name '$tool') ("' can not be used to resolve merges") ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [16777215 1016] ) (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(diff_mode)}) (command.Pipeline children: [(C {(can_diff)})] negated: T ) ] ) ] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ("error: '") ($ VSub_Name '$tool') ("' can only be used to resolve merges") ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [1036 1047] ) ] spids: [16777215 1067] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [849] ) spids: [844 848] ) (command.FuncDef name: get_merge_tool_cmd body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool spids:[1085]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [1085] ) ] spids: [1085] ) (command.If arms: [ (if_arm cond: [(C {(diff_mode)})] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(git)} {(config)} {(DQ (difftool.) ($ VSub_Name '$merge_tool') (.cmd))}) (C {(git)} {(config)} {(DQ (mergetool.) ($ VSub_Name '$merge_tool') (.cmd))}) ] ) ] spids: [16777215 1096] ) ] else_action: [ (C {(git)} {(config)} {(DQ (mergetool.) ($ VSub_Name '$merge_tool') (.cmd))}) ] spids: [1123 1137] ) ] spids: [1082] ) spids: [1077 1081] ) (command.FuncDef name: run_merge_tool body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:GIT_PREFIX spids:[1161]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name GIT_PREFIX> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(.)}) spids: [1162 1166] ) } spids: [1161] ) ] spids: [1161] ) (C {(export)} {(GIT_PREFIX)}) (command.AndOr ops: [Op_DPipe] children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool_path spids:[1175]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(get_merge_tool_path)} {(DQ ($ VSub_Number '$1'))})] ) left_token: <Left_CommandSub '$('> spids: [1176 1182] ) } spids: [1175] ) ] spids: [1175] ) (command.ControlFlow token:<ControlFlow_Exit exit>) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:base_present spids:[1189]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [1189] ) ] spids: [1189] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(setup_tool)} {(DQ ($ VSub_Number '$1'))}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (command.If arms: [ (if_arm cond: [(C {(merge_mode)})] action: [(C {(run_merge_cmd)} {(DQ ($ VSub_Number '$1'))})] spids: [16777215 1219] ) ] else_action: [(C {(run_diff_cmd)} {(DQ ($ VSub_Number '$1'))})] spids: [1229 1239] ) ] spids: [1150] ) spids: [1145 1149] ) (command.FuncDef name: run_diff_cmd body: (command.BraceGroup children:[(C {(diff_cmd)} {(DQ ($ VSub_Number '$1'))})] spids:[1252]) spids: [1247 1251] ) (command.FuncDef name: run_merge_cmd body: (command.BraceGroup children: [(C {(merge_cmd)} {(DQ ($ VSub_Number '$1'))})] spids: [1272] ) spids: [1267 1271] ) (command.FuncDef name: list_merge_tool_candidates body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [(C {(merge_mode)})] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1300]) op: Equal rhs: {(DQ (tortoisemerge))} spids: [1300] ) ] spids: [1300] ) ] spids: [16777215 1297] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1309]) op: Equal rhs: {(DQ (kompare))} spids: [1309] ) ] spids: [1309] ) ] spids: [1306 1315] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$DISPLAY'))})] action: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$GNOME_DESKTOP_SESSION_ID'))})] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1346]) op: Equal rhs: { (DQ ('meld opendiff kdiff3 tkdiff xxdiff ') ($ VSub_Name '$tools') ) } spids: [1346] ) ] spids: [1346] ) ] spids: [16777215 1343] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1356]) op: Equal rhs: {(DQ ('opendiff kdiff3 tkdiff xxdiff meld ') ($ VSub_Name '$tools'))} spids: [1356] ) ] spids: [1356] ) ] spids: [1353 1363] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1366]) op: Equal rhs: {(DQ ($ VSub_Name '$tools') (' gvimdiff diffuse diffmerge ecmerge'))} spids: [1366] ) ] spids: [1366] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1373]) op: Equal rhs: {(DQ ($ VSub_Name '$tools') (' p4merge araxis bc codecompare'))} spids: [1373] ) ] spids: [1373] ) ] spids: [16777215 1329] ) ] spids: [16777215 1380] ) (command.Case to_match: { (DQ (word_part.BracedVarSub token: <VSub_Name VISUAL> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name '$EDITOR')} ) spids: [1386 1390] ) ) } arms: [ (case_arm pat_list: [{(Lit_Other '*') (vim) (Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1402]) op: Equal rhs: {(DQ ($ VSub_Name '$tools') (' vimdiff emerge'))} spids: [1402] ) ] spids: [1402] ) ] spids: [1396 1399 1409 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1416]) op: Equal rhs: {(DQ ($ VSub_Name '$tools') (' emerge vimdiff'))} spids: [1416] ) ] spids: [1416] ) ] spids: [1412 1413 1423 16777215] ) ] spids: [1383 1393 1426] ) ] spids: [1289] ) spids: [1284 1288] ) (command.FuncDef name: show_tool_help body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tool_opt spids:[1439]) op: Equal rhs: {(DQ ("'git ") (${ VSub_Name TOOL_MODE) ("tool --tool=<tool>'"))} spids: [1439] ) ] spids: [1439] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tab spids:[1450]) op: Equal rhs: {(SQ <'\t'>)} spids: [1450] ) ] spids: [1450] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:LF spids:[1456]) op: Equal rhs: {(SQ <'\n'>)} spids: [1456] ) ] spids: [1456] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:any_shown spids:[1462]) op: Equal rhs: {(no)} spids: [1462] ) ] spids: [1462] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cmd_name spids:[1467]) op: Equal rhs: {(${ VSub_Name TOOL_MODE) (tool)} spids: [1467] ) ] spids: [1467] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:config_tools spids:[1474]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(diff_mode)}) (C {(list_config_tools)} {(difftool)} {(DQ ($ VSub_Name '$tab') ($ VSub_Name '$tab'))} ) ] ) (C {(list_config_tools)} {(mergetool)} {(DQ ($ VSub_Name '$tab') ($ VSub_Name '$tab'))} ) ] spids: [1476] ) (C {(sort)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1475 1508] ) } spids: [1474] ) ] spids: [1474] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:extra_content spids:[1511]) op: Equal rhs: (word.EmptyWord) spids: [1511] ) ] spids: [1511] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$config_tools'))})] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:extra_content spids:[1528]) op: Equal rhs: { (DQ (${ VSub_Name tab) ('user-defined:') (${ VSub_Name LF) ($ VSub_Name '$config_tools') ) } spids: [1528] ) ] spids: [1528] ) ] spids: [16777215 1525] ) ] spids: [16777215 1541] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(show_tool_names)} {(SQ <'mode_ok && is_available'>)} {(DQ ($ VSub_Name '$tab') ($ VSub_Name '$tab'))} {(DQ ($ VSub_Name '$tool_opt') (' may be set to one of the following:'))} { (DQ ("No suitable tool for 'git ") ($ VSub_Name '$cmd_name') (" --tool=<tool>' found.") ) } {(DQ ($ VSub_Name '$extra_content'))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:any_shown spids:[1580]) op: Equal rhs: {(yes)} spids: [1580] ) ] spids: [1580] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(show_tool_names)} {(SQ <'mode_ok && ! is_available'>)} {(DQ ($ VSub_Name '$tab') ($ VSub_Name '$tab'))} {(DQ (${ VSub_Name LF) ('The following tools are valid, but not currently available:'))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:any_shown spids:[1608]) op: Equal rhs: {(yes)} spids: [1608] ) ] spids: [1608] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(DQ ($ VSub_Name '$any_shown'))} {(Lit_Other '=')} {(yes)})] action: [ (C {(echo)}) (C {(echo)} {(DQ ('Some of the tools listed above only work in a windowed'))}) (C {(echo)} {(DQ ('environment. If run in a terminal-only session, they will fail.'))} ) ] spids: [16777215 1626] ) ] spids: [16777215 1646] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [1436] ) spids: [1431 1435] ) (command.FuncDef name: guess_merge_tool body: (command.BraceGroup children: [ (C {(list_merge_tool_candidates)}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)}) (redir.HereDoc op: <Redir_DLessDash '<<-'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1692 stdin_parts: [ ('\n') ("This message is displayed because '") ($ VSub_Name '$TOOL_MODE') (".tool' is not configured.\n") ("See 'git ") (${ VSub_Name TOOL_MODE) ("tool --tool-help' or 'git help config' for more details.\n") ("'git ") (${ VSub_Name TOOL_MODE) ("tool' will now attempt to use one of the following tools:\n") ($ VSub_Name '$tools') ('\n') ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:IFS spids:[1699]) op: Equal rhs: {(SQ <' '>)} spids: [1699] ) ] spids: [1699] ) (command.ForEach iter_name: tool iter_words: [{($ VSub_Name '$tools')}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(is_available)} {(DQ ($ VSub_Name '$tool'))}) (C {(echo)} {(DQ ($ VSub_Name '$tool'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] spids: [1714 1738] ) spids: [1710 16777215] ) (command.SimpleCommand words: [{(echo)} {(DQ ('No known ') (${ VSub_Name TOOL_MODE) (' tool is available.'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [1661] ) spids: [1656 1660] ) (command.FuncDef name: get_configured_merge_tool body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [(C {(diff_mode)})] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool spids:[1787]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(git)} {(config)} {(diff.tool)}) (C {(git)} {(config)} {(merge.tool)}) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [1788 1802] ) } spids: [1787] ) ] spids: [1787] ) ] spids: [16777215 1784] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool spids:[1808]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {(merge.tool)})] ) left_token: <Left_CommandSub '$('> spids: [1809 1815] ) } spids: [1808] ) ] spids: [1808] ) ] spids: [1805 1818] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$merge_tool'))}) (command.Pipeline children: [(C {(valid_tool)} {(DQ ($ VSub_Name '$merge_tool'))})] negated: T ) ] ) ] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ('git config option ') ($ VSub_Name '$TOOL_MODE') ('.tool set to unknown tool: ') ($ VSub_Name '$merge_tool') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ('Resetting to default...'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [16777215 1842] ) ] spids: [16777215 1873] ) (C {(echo)} {(DQ ($ VSub_Name '$merge_tool'))}) ] spids: [1768] ) spids: [1763 1767] ) (command.FuncDef name: get_merge_tool_path body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool spids:[1897]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [1897] ) ] spids: [1897] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [(C {(valid_tool)} {(DQ ($ VSub_Name '$merge_tool'))})] negated: T ) ] action: [ (command.SimpleCommand words: [{(echo)} {(DQ ('Unknown merge tool ') ($ VSub_Name '$merge_tool'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [16777215 1914] ) ] spids: [16777215 1933] ) (command.If arms: [ (if_arm cond: [(C {(diff_mode)})] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool_path spids:[1944]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(git)} {(config)} {(difftool.) (DQ ($ VSub_Name '$merge_tool')) (.path)} ) (C {(git)} {(config)} {(mergetool.) (DQ ($ VSub_Name '$merge_tool')) (.path)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [1945 1968] ) } spids: [1944] ) ] spids: [1944] ) ] spids: [16777215 1941] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool_path spids:[1974]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(config)} {(mergetool.) (DQ ($ VSub_Name '$merge_tool')) (.path)} ) ] ) left_token: <Left_CommandSub '$('> spids: [1975 1985] ) } spids: [1974] ) ] spids: [1974] ) ] spids: [1971 1988] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$merge_tool_path'))})] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool_path spids:[2005]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(translate_merge_tool_path)} {(DQ ($ VSub_Name '$merge_tool'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [2006 2012] ) } spids: [2005] ) ] spids: [2005] ) ] spids: [16777215 2002] ) ] spids: [16777215 2015] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(get_merge_tool_cmd)} {(DQ ($ VSub_Name '$merge_tool'))}) ] ) left_token: <Left_CommandSub '$('> spids: [2025 2031] ) ) } ) (command.Pipeline children: [ (command.SimpleCommand words: [{(type)} {(DQ ($ VSub_Name '$merge_tool_path'))}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) ] negated: T ) ] ) ] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ('The ') ($ VSub_Name '$TOOL_MODE') (' tool ') ($ VSub_Name '$merge_tool') (' is not available as') ) } {(DQ ("'") ($ VSub_Name '$merge_tool_path') ("'"))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [16777215 2052] ) ] spids: [16777215 2081] ) (C {(echo)} {(DQ ($ VSub_Name '$merge_tool_path'))}) ] spids: [1890] ) spids: [1885 1889] ) (command.FuncDef name: get_merge_tool body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool spids:[2105]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(get_configured_merge_tool)})] ) left_token: <Left_CommandSub '$('> spids: [2106 2108] ) } spids: [2105] ) ] spids: [2105] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$merge_tool'))})] action: [ (command.AndOr ops: [Op_DPipe] children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool spids:[2129]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(guess_merge_tool)})] ) left_token: <Left_CommandSub '$('> spids: [2130 2132] ) } spids: [2129] ) ] spids: [2129] ) (command.ControlFlow token:<ControlFlow_Exit exit>) ] ) ] spids: [16777215 2126] ) ] spids: [16777215 2139] ) (C {(echo)} {(DQ ($ VSub_Name '$merge_tool'))}) ] spids: [2098] ) spids: [2093 2097] ) (command.FuncDef name: mergetool_find_win32_cmd body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:executable spids:[2159]) op: Equal rhs: {($ VSub_Number '$1')} spids: [2159] ) ] spids: [2159] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:sub_directory spids:[2163]) op: Equal rhs: {($ VSub_Number '$2')} spids: [2163] ) ] spids: [2163] ) (command.If arms: [ (if_arm cond: [ (command.SimpleCommand words: [{(type)} {(-p)} {(DQ ($ VSub_Name '$executable'))}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) ] action: [ (C {(printf)} {(SQ <'%s'>)} {(DQ ($ VSub_Name '$executable'))}) (command.ControlFlow token:<ControlFlow_Return return>) ] spids: [16777215 2189] ) ] spids: [16777215 2206] ) (command.ForEach iter_name: directory iter_words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(env)}) (C {(grep)} {(-Ei)} {(SQ <'^PROGRAM(FILES(\\(X86\\))?|W6432)='>)}) (C {(cut)} {(-d)} {(SQ <'='>)} {(-f)} {(2-)}) (C {(sort)} {(-u)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [2220 2253] ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$directory'))}) (C {(test)} {(-x)} { (DQ ($ VSub_Name '$directory') (/) ($ VSub_Name '$sub_directory') (/) ($ VSub_Name '$executable') ) } ) ] ) ] action: [ (C {(printf)} {(SQ <'%s'>)} { (DQ ($ VSub_Name '$directory') (/) ($ VSub_Name '$sub_directory') (/) ($ VSub_Name '$executable') ) } ) (command.ControlFlow token: <ControlFlow_Return return> ) ] spids: [16777215 2284] ) ] spids: [16777215 2305] ) ] spids: [2256 2308] ) spids: [2219 16777215] ) (C {(printf)} {(SQ <'%s'>)} {(DQ ($ VSub_Name '$executable'))}) ] spids: [2156] ) spids: [2151 2155] ) ] )