(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: [17 21] ) (Lit_Slash /) (mergetools) } ) spids: [14 24] ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:IFS spids:[27]) op: Equal rhs: {(SQ <'\n'>)} spids: [27] ) ] spids: [27] ) (command.FuncDef name: mode_ok body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [(C {(diff_mode)})] action: [(C {(can_diff)})] spids: [16777215 46] ) (if_arm cond: [(C {(merge_mode)})] action: [(C {(can_merge)})] spids: [52 57] ) ] else_action: [(C {(false)})] spids: [63 69] ) ] spids: [38] ) spids: [33 37] ) (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:[82]) 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: [83 89] ) } spids: [82] ) ] spids: [82] ) (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: [79] ) spids: [74 78] ) (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:[117]) op: Equal rhs: {($ VSub_Number '$1')} spids: [117] ) ] spids: [117] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:line_prefix spids:[121]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 2> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [122 125] ) } spids: [121] ) ] spids: [121] ) (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:[157]) 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: [158 163] ) } spids: [157] ) ] spids: [157] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:toolname spids:[166]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name toolname> suffix_op: (suffix_op.StringUnary op_id: VOp1_Percent arg_word: {(.cmd)} ) spids: [167 171] ) } spids: [166] ) ] spids: [166] ) (C {(printf)} {(DQ ('%s%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$line_prefix'))} {(DQ ($ VSub_Name '$toolname'))} ) ] spids: [154 192] ) ) ] negated: F ) ] spids: [114] ) spids: [109 113] ) (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:[205]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(true)}) spids: [206 210] ) } spids: [205] ) (assign_pair lhs: (lhs_expr.LhsName name:per_line_prefix spids:[212]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 2> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [213 216] ) } spids: [212] ) (assign_pair lhs: (lhs_expr.LhsName name:preamble spids:[218]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [219 222] ) } spids: [218] ) ] spids: [205] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:not_found_msg spids:[225]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 4> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [226 229] ) } spids: [225] ) ] spids: [225] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:extra_content spids:[232]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 5> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [233 236] ) } spids: [232] ) ] spids: [232] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:shown_any spids:[240]) op: Equal rhs: (word.EmptyWord) spids: [240] ) ] spids: [240] ) (command.Pipeline children: [ (command.Subshell child: (command.AndOr ops: [Op_DAmp] children: [(C {(cd)} {(DQ ($ VSub_Name '$MERGE_TOOLS_DIR'))}) (C {(ls)})] ) spids: [243 255] ) (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: [286 296] ) ] ) ] 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:[329]) op: Equal rhs: (word.EmptyWord) spids: [329] ) ] spids: [329] ) ] spids: [16777215 313] ) ] spids: [16777215 332] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:shown_any spids:[335]) op: Equal rhs: {(yes)} spids: [335] ) ] spids: [335] ) (C {(printf)} {(DQ ('%s%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$per_line_prefix'))} {(DQ ($ VSub_Name '$toolname'))} ) ] spids: [16777215 299] ) ] spids: [16777215 356] ) ] spids: [269 359] ) ) (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:[410]) op: Equal rhs: (word.EmptyWord) spids: [410] ) ] spids: [410] ) ] spids: [16777215 388] ) ] spids: [16777215 413] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:shown_any spids:[416]) op: Equal rhs: {(yes)} spids: [416] ) ] spids: [416] ) (C {(printf)} {(DQ (Lit_Other '\\') ('n%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$extra_content'))} ) ] spids: [16777215 374] ) ] spids: [16777215 434] ) (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 459] ) ] spids: [16777215 475] ) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$shown_any'))}) ] spids: [259] ) ] negated: F ) ] spids: [202] ) spids: [197 201] ) (command.FuncDef name: diff_mode body: (command.BraceGroup children: [(C {(test)} {(DQ ($ VSub_Name '$TOOL_MODE'))} {(Lit_Other '=')} {(diff)})] spids: [497] ) spids: [493 496] ) (command.FuncDef name: merge_mode body: (command.BraceGroup children: [(C {(test)} {(DQ ($ VSub_Name '$TOOL_MODE'))} {(Lit_Other '=')} {(merge)})] spids: [517] ) spids: [513 516] ) (command.FuncDef name: translate_merge_tool_path body: (command.BraceGroup children:[(C {(echo)} {(DQ ($ VSub_Number '$1'))})] spids:[538]) spids: [533 537] ) (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 573] ) ] 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: [627 632 638 16777215] ) (case_arm pat_list: [{(n) (Lit_Other '*')} {(N) (Lit_Other '*')}] action: [ (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [641 646 652 16777215] ) ] spids: [618 624 655] ) ] spids: [589 658] ) ) ] spids: [581 661] ) ] spids: [555] ) spids: [550 554] ) (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:[687]) 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: [688 694] ) } spids: [687] ) ] spids: [687] ) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$cmd'))}) ] spids: [671] ) spids: [666 670] ) (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:[716]) 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: [717 723] ) } spids: [716] ) ] spids: [716] ) (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: [750 756] ) ] spids: [747] ) spids: [742 746] ) (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:[771]) 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: [772 792] ) } spids: [771] ) ] spids: [771] ) (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: [820 826] ) (C {(check_unchanged)}) ] spids: [16777215 810] ) ] else_action: [ (command.Subshell child: (C {(eval)} {($ VSub_Name '$merge_tool_cmd')}) spids: [835 841] ) ] spids: [832 844] ) ] spids: [768] ) spids: [763 767] ) ] spids: [713] ) spids: [708 712] ) (command.FuncDef name: setup_tool body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tool spids:[860]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [860] ) ] spids: [860] ) (command.FuncDef name: can_merge body: (command.BraceGroup children: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [876] ) spids: [871 875] ) (command.FuncDef name: can_diff body: (command.BraceGroup children: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [893] ) spids: [888 892] ) (command.FuncDef name: diff_cmd body: (command.BraceGroup children: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [910] ) spids: [905 909] ) (command.FuncDef name: merge_cmd body: (command.BraceGroup children: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [927] ) spids: [922 926] ) (command.FuncDef name: translate_merge_tool_path body: (command.BraceGroup children: [(C {(echo)} {(DQ ($ VSub_Number '$1'))})] spids: [944] ) spids: [939 943] ) (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 973] ) ] spids: [16777215 984] ) (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 1024] ) (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: [1044 1055] ) ] spids: [16777215 1075] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [857] ) spids: [852 856] ) (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:[1093]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [1093] ) ] spids: [1093] ) (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 1104] ) ] else_action: [ (C {(git)} {(config)} {(DQ (mergetool.) ($ VSub_Name '$merge_tool') (.cmd))}) ] spids: [1131 1145] ) ] spids: [1090] ) spids: [1085 1089] ) (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:[1169]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name GIT_PREFIX> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(.)}) spids: [1170 1174] ) } spids: [1169] ) ] spids: [1169] ) (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:[1183]) 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: [1184 1190] ) } spids: [1183] ) ] spids: [1183] ) (command.ControlFlow token:<ControlFlow_Exit exit>) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:base_present spids:[1197]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [1197] ) ] spids: [1197] ) (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 1227] ) ] else_action: [(C {(run_diff_cmd)} {(DQ ($ VSub_Number '$1'))})] spids: [1237 1247] ) ] spids: [1158] ) spids: [1153 1157] ) (command.FuncDef name: run_diff_cmd body: (command.BraceGroup children:[(C {(diff_cmd)} {(DQ ($ VSub_Number '$1'))})] spids:[1260]) spids: [1255 1259] ) (command.FuncDef name: run_merge_cmd body: (command.BraceGroup children: [(C {(merge_cmd)} {(DQ ($ VSub_Number '$1'))})] spids: [1280] ) spids: [1275 1279] ) (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:[1308]) op: Equal rhs: {(DQ (tortoisemerge))} spids: [1308] ) ] spids: [1308] ) ] spids: [16777215 1305] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1317]) op: Equal rhs: {(DQ (kompare))} spids: [1317] ) ] spids: [1317] ) ] spids: [1314 1323] ) (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:[1354]) op: Equal rhs: { (DQ ('meld opendiff kdiff3 tkdiff xxdiff ') ($ VSub_Name '$tools') ) } spids: [1354] ) ] spids: [1354] ) ] spids: [16777215 1351] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1364]) op: Equal rhs: {(DQ ('opendiff kdiff3 tkdiff xxdiff meld ') ($ VSub_Name '$tools'))} spids: [1364] ) ] spids: [1364] ) ] spids: [1361 1371] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1374]) op: Equal rhs: {(DQ ($ VSub_Name '$tools') (' gvimdiff diffuse diffmerge ecmerge'))} spids: [1374] ) ] spids: [1374] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1381]) op: Equal rhs: {(DQ ($ VSub_Name '$tools') (' p4merge araxis bc codecompare'))} spids: [1381] ) ] spids: [1381] ) ] spids: [16777215 1337] ) ] spids: [16777215 1388] ) (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: [1394 1398] ) ) } 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:[1410]) op: Equal rhs: {(DQ ($ VSub_Name '$tools') (' vimdiff emerge'))} spids: [1410] ) ] spids: [1410] ) ] spids: [1404 1407 1417 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tools spids:[1424]) op: Equal rhs: {(DQ ($ VSub_Name '$tools') (' emerge vimdiff'))} spids: [1424] ) ] spids: [1424] ) ] spids: [1420 1421 1431 16777215] ) ] spids: [1391 1401 1434] ) ] spids: [1297] ) spids: [1292 1296] ) (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:[1447]) op: Equal rhs: {(DQ ("'git ") (${ VSub_Name TOOL_MODE) ("tool --tool=<tool>'"))} spids: [1447] ) ] spids: [1447] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tab spids:[1458]) op: Equal rhs: {(SQ <'\t'>)} spids: [1458] ) ] spids: [1458] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:LF spids:[1464]) op: Equal rhs: {(SQ <'\n'>)} spids: [1464] ) ] spids: [1464] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:any_shown spids:[1470]) op: Equal rhs: {(no)} spids: [1470] ) ] spids: [1470] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cmd_name spids:[1475]) op: Equal rhs: {(${ VSub_Name TOOL_MODE) (tool)} spids: [1475] ) ] spids: [1475] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:config_tools spids:[1482]) 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: [1484] ) (C {(sort)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1483 1516] ) } spids: [1482] ) ] spids: [1482] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:extra_content spids:[1519]) op: Equal rhs: (word.EmptyWord) spids: [1519] ) ] spids: [1519] ) (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:[1536]) op: Equal rhs: { (DQ (${ VSub_Name tab) ('user-defined:') (${ VSub_Name LF) ($ VSub_Name '$config_tools') ) } spids: [1536] ) ] spids: [1536] ) ] spids: [16777215 1533] ) ] spids: [16777215 1549] ) (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:[1588]) op: Equal rhs: {(yes)} spids: [1588] ) ] spids: [1588] ) ] ) (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:[1616]) op: Equal rhs: {(yes)} spids: [1616] ) ] spids: [1616] ) ] ) (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 1634] ) ] spids: [16777215 1654] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [1444] ) spids: [1439 1443] ) (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: 1700 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:[1707]) op: Equal rhs: {(SQ <' '>)} spids: [1707] ) ] spids: [1707] ) (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: [1722 1746] ) spids: [1718 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: [1669] ) spids: [1664 1668] ) (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:[1795]) 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: [1796 1810] ) } spids: [1795] ) ] spids: [1795] ) ] spids: [16777215 1792] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool spids:[1816]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {(merge.tool)})] ) left_token: <Left_CommandSub '$('> spids: [1817 1823] ) } spids: [1816] ) ] spids: [1816] ) ] spids: [1813 1826] ) (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 1850] ) ] spids: [16777215 1881] ) (C {(echo)} {(DQ ($ VSub_Name '$merge_tool'))}) ] spids: [1776] ) spids: [1771 1775] ) (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:[1905]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [1905] ) ] spids: [1905] ) (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 1922] ) ] spids: [16777215 1941] ) (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:[1952]) 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: [1953 1976] ) } spids: [1952] ) ] spids: [1952] ) ] spids: [16777215 1949] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:merge_tool_path spids:[1982]) 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: [1983 1993] ) } spids: [1982] ) ] spids: [1982] ) ] spids: [1979 1996] ) (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:[2013]) 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: [2014 2020] ) } spids: [2013] ) ] spids: [2013] ) ] spids: [16777215 2010] ) ] spids: [16777215 2023] ) (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: [2033 2039] ) ) } ) (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 2060] ) ] spids: [16777215 2089] ) (C {(echo)} {(DQ ($ VSub_Name '$merge_tool_path'))}) ] spids: [1898] ) spids: [1893 1897] ) (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:[2113]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(get_configured_merge_tool)})] ) left_token: <Left_CommandSub '$('> spids: [2114 2116] ) } spids: [2113] ) ] spids: [2113] ) (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:[2137]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(guess_merge_tool)})] ) left_token: <Left_CommandSub '$('> spids: [2138 2140] ) } spids: [2137] ) ] spids: [2137] ) (command.ControlFlow token:<ControlFlow_Exit exit>) ] ) ] spids: [16777215 2134] ) ] spids: [16777215 2147] ) (C {(echo)} {(DQ ($ VSub_Name '$merge_tool'))}) ] spids: [2106] ) spids: [2101 2105] ) (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:[2167]) op: Equal rhs: {($ VSub_Number '$1')} spids: [2167] ) ] spids: [2167] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:sub_directory spids:[2171]) op: Equal rhs: {($ VSub_Number '$2')} spids: [2171] ) ] spids: [2171] ) (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 2197] ) ] spids: [16777215 2214] ) (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: [2228 2261] ) } ] 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 2292] ) ] spids: [16777215 2313] ) ] spids: [2264 2316] ) spids: [2227 16777215] ) (C {(printf)} {(SQ <'%s'>)} {(DQ ($ VSub_Name '$executable'))}) ] spids: [2164] ) spids: [2159 2163] ) ] )