(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:USAGE) op: Equal rhs: {(SQ <'[--browser=browser|--tool=browser] [--config=conf.var] url/file ...'>)} spids: [52] ) ] spids: [52] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NONGIT_OK) op:Equal rhs:{(Yes)} spids:[64])] spids: [64] ) (C {(.)} {(git-sh-setup)}) (FuncDef name: valid_custom_tool body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_cmd) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(config)} {(DQ (browser.) ($ VSub_Number '$1') (.cmd))}) ] ) left_token: <Left_CommandSub '$('> spids: [81 91] ) ) } spids: [79] ) ] spids: [79] ) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$browser_cmd'))}) ] spids: [76] ) spids: [72 75] ) (FuncDef name: valid_tool body: (BraceGroup children: [ (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [ {(firefox)} {(iceweasel)} {(seamonkey)} {(iceape)} {(chrome)} {(google-chrome)} {(chromium)} {(chromium-browser)} {(konqueror)} {(opera)} {(w3m)} {(elinks)} {(links)} {(lynx)} {(dillo)} {(open)} {(start)} {(cygstart)} {(xdg-open)} ] spids: [122 201 204 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(valid_custom_tool)} {(DQ ($ VSub_Number '$1'))}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] spids: [210 211 227 16777215] ) ] spids: [113 119 230] ) ] spids: [110] ) spids: [106 109] ) (FuncDef name: init_browser_path body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(config)} {(DQ (browser.) ($ VSub_Number '$1') (.path))}) ] ) left_token: <Left_CommandSub '$('> spids: [243 253] ) } spids: [242] ) ] spids: [242] ) (If arms: [ (if_arm cond: [ (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser_path'))}) (C {(test)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(chromium)}) (SimpleCommand words: [{(type)} {(chromium-browser)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [286] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [289] ) ] ) ] ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_path) op: Equal rhs: {(chromium-browser)} spids: [296] ) ] spids: [296] ) ] spids: [16777215 293] ) ] spids: [16777215 300] ) (C {(Lit_Other ':')} { (BracedVarSub token: <VSub_Name browser_path> suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(DQ ($ VSub_Number '$1'))}) spids: [305 311] ) } ) ] spids: [239] ) spids: [235 238] ) (While cond: [(C {(test)} {($ VSub_Pound '$#')} {(KW_Bang '!') (Lit_Other '=')} {(0)})] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-b)} {(--browser) (Lit_Other '*')} {(-t)} {(--tool) (Lit_Other '*')}] action: [ (Case to_match: {(DQ ($ VSub_Pound '$#') (',') ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [ {(Lit_Other '*') (Lit_Comma ',') (Lit_Other '*') (Lit_Other '=') (Lit_Other '*') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Number '$1'))} {(Lit_Other ':')} {(SQ <'z-[^=]*=\\(.*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [371 384] ) } spids: [370] ) ] spids: [370] ) ] spids: [362 367 387 16777215] ) (case_arm pat_list: [{(1) (Lit_Comma ',') (Lit_Other '*')}] action: [(C {(usage)})] spids: [390 393 398 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [405] ) ] spids: [405] ) (C {(shift)}) ] spids: [401 402 413 16777215] ) ] spids: [351 359 416] ) ] spids: [339 348 419 16777215] ) (case_arm pat_list: [{(-c)} {(--config) (Lit_Other '*')}] action: [ (Case to_match: {(DQ ($ VSub_Pound '$#') (',') ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [ {(Lit_Other '*') (Lit_Comma ',') (Lit_Other '*') (Lit_Other '=') (Lit_Other '*') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:conf) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Number '$1'))} {(Lit_Other ':')} {(SQ <'z-[^=]*=\\(.*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [449 462] ) } spids: [448] ) ] spids: [448] ) ] spids: [440 445 465 16777215] ) (case_arm pat_list: [{(1) (Lit_Comma ',') (Lit_Other '*')}] action: [(C {(usage)})] spids: [468 471 476 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:conf) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [483] ) ] spids: [483] ) (C {(shift)}) ] spids: [479 480 491 16777215] ) ] spids: [429 437 494] ) ] spids: [422 426 497 16777215] ) (case_arm pat_list: [{(--)}] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [500 501 507 16777215] ) (case_arm pat_list: [{(-) (Lit_Other '*')}] action: [(C {(usage)})] spids: [510 512 518 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [521 522 528 16777215] ) ] spids: [330 336 531] ) (C {(shift)}) ] spids: [327 536] ) ) (AndOr ops: [Op_DAmp] children: [(C {(test)} {($ VSub_Pound '$#')} {(Lit_Other '=')} {(0)}) (C {(usage)})] ) (If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser'))})] action: [ (ForEach iter_name: opt iter_words: [{(DQ ($ VSub_Name '$conf'))} {(DQ (web.browser))}] do_arg_iter: F body: (DoGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$opt'))}) (ControlFlow token:<ControlFlow_Continue continue>) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(git)} {(config)} {($ VSub_Name '$opt')})] ) left_token: <Left_CommandSub '$('> spids: [598 604] ) ) } spids: [596] ) ] spids: [596] ) (AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser'))}) (ControlFlow token:<ControlFlow_Break break>) ] ) ] spids: [580 621] ) spids: [570 16777215] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$browser'))}) (Pipeline children: [(C {(valid_tool)} {(DQ ($ VSub_Name '$browser'))})] negated: T ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('git config option ') ($ VSub_Name '$opt') (' set to unknown browser: ') ($ VSub_Name '$browser') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[650])] ) (SimpleCommand words: [{(echo)} {(DQ ('Resetting to default...'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[663])] ) (C {(unset)} {(browser)}) ] spids: [16777215 645] ) ] spids: [16777215 676] ) ] spids: [16777215 562] ) ] spids: [16777215 678] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser'))}) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(-n)} {(DQ ($ VSub_Name '$DISPLAY'))}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_candidates) op: Equal rhs: { (DQ ( 'firefox iceweasel google-chrome chrome chromium chromium-browser konqueror opera seamonkey iceape w3m elinks links lynx dillo xdg-open' ) ) } spids: [710] ) ] spids: [710] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(DQ ($ VSub_Name '$KDE_FULL_SESSION'))} {(Lit_Other '=')} {(DQ (true))} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_candidates) op: Equal rhs: {(DQ ('konqueror ') ($ VSub_Name '$browser_candidates'))} spids: [734] ) ] spids: [734] ) ] spids: [16777215 731] ) ] spids: [16777215 741] ) ] spids: [16777215 707] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_candidates) op: Equal rhs: {(DQ ('w3m elinks links lynx'))} spids: [747] ) ] spids: [747] ) ] spids: [744 753] ) (If arms: [ (if_arm cond: [ (AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$SECURITYSESSIONID'))}) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$TERM_PROGRAM'))}) ] ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_candidates) op: Equal rhs: {(DQ ('open ') ($ VSub_Name '$browser_candidates'))} spids: [784] ) ] spids: [784] ) ] spids: [16777215 781] ) ] spids: [16777215 791] ) (If arms: [ (if_arm cond: [(Sentence child:(C {(test)} {(-x)} {(/bin/start)}) terminator:<Op_Semi ';'>)] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_candidates) op: Equal rhs: {(DQ ('start ') ($ VSub_Name '$browser_candidates'))} spids: [810] ) ] spids: [810] ) ] spids: [16777215 807] ) ] spids: [16777215 817] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(-x)} {(/usr/bin/cygstart)}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_candidates) op: Equal rhs: {(DQ ('cygstart ') ($ VSub_Name '$browser_candidates'))} spids: [836] ) ] spids: [836] ) ] spids: [16777215 833] ) ] spids: [16777215 843] ) (ForEach iter_name: i iter_words: [{($ VSub_Name '$browser_candidates')}] do_arg_iter: F body: (DoGroup children: [ (C {(init_browser_path)} {($ VSub_Name '$i')}) (If arms: [ (if_arm cond: [ (Sentence child: (SimpleCommand words: [{(type)} {(DQ ($ VSub_Name '$browser_path'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [872] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [876] ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser) op: Equal rhs: {($ VSub_Name '$i')} spids: [883] ) ] spids: [883] ) (ControlFlow token:<ControlFlow_Break break>) ] spids: [16777215 880] ) ] spids: [16777215 890] ) ] spids: [856 893] ) spids: [852 854] ) (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser'))}) (C {(die)} {(DQ ('No known browser available.'))}) ] ) ] spids: [16777215 693] ) ] else_action: [ (AndOr ops: [Op_DPipe] children: [ (C {(valid_tool)} {(DQ ($ VSub_Name '$browser'))}) (C {(die)} {(DQ ("Unknown browser '") ($ VSub_Name '$browser') ("'."))}) ] ) (C {(init_browser_path)} {(DQ ($ VSub_Name '$browser'))}) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser_cmd'))}) (Pipeline children: [ (SimpleCommand words: [{(type)} {(DQ ($ VSub_Name '$browser_path'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [961] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [965] ) ] ) ] negated: T ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(die)} { (DQ ('The browser ') ($ VSub_Name '$browser') (" is not available as '") ($ VSub_Name '$browser_path') ("'.") ) } ) ] spids: [16777215 969] ) ] spids: [16777215 983] ) ] spids: [912 985] ) (Case to_match: {(DQ ($ VSub_Name '$browser'))} arms: [ (case_arm pat_list: [{(firefox)} {(iceweasel)} {(seamonkey)} {(iceape)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:vers) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {($ VSub_Name '$browser_path')} {(-version)})] ) left_token: <Left_CommandSub '$('> spids: [1015 1019] ) ) } {(Lit_Other ':')} {(SQ <'.* \\([0-9][0-9]*\\)\\..*'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [1011 1027] ) } spids: [1010] ) ] spids: [1010] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NEWTAB) op: Equal rhs: {(SQ <-new-tab>)} spids: [1030] ) ] spids: [1030] ) (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(DQ ($ VSub_Name '$vers'))} {(-lt)} {(2)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NEWTAB) op:Equal rhs:{(SQ )} spids:[1048])] spids: [1048] ) ] ) (Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {($ VSub_Name '$NEWTAB')} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [996 1003 1066 16777215] ) (case_arm pat_list: [{(google-chrome)} {(chrome)} {(chromium)} {(chromium-browser)}] action: [ (Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1068 1075 1093 16777215] ) (case_arm pat_list: [{(konqueror)}] action: [ (Case to_match: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(basename)} {(DQ ($ VSub_Name '$browser_path'))})] ) left_token: <Left_CommandSub '$('> spids: [1102 1108] ) ) } arms: [ (case_arm pat_list: [{(konqueror)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:browser_path) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$browser_path'))}) (C {(sed)} {(-e)} {(SQ <'s/konqueror$/kfmclient/'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1124 1140] ) ) } spids: [1122] ) ] spids: [1122] ) (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [{(type)} {(DQ ($ VSub_Name '$browser_path'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [1150] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [1154] ) ] ) (C {(die)} {(DQ ("No '") ($ VSub_Name '$browser_path') ("' found."))}) ] ) (Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(newTab)} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1114 1115 1181 16777215] ) (case_arm pat_list: [{(kfmclient)}] action: [ (Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(newTab)} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1184 1185 1201 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1204 1205 1219 16777215] ) ] spids: [1099 1111 1222] ) ] spids: [1095 1096 1225 16777215] ) (case_arm pat_list: [{(w3m)} {(elinks)} {(links)} {(lynx)} {(open)} {(cygstart)} {(xdg-open)}] action: [(C {(DQ ($ VSub_Name '$browser_path'))} {(DQ ($ VSub_At '$@'))})] spids: [1227 1240 1252 16777215] ) (case_arm pat_list: [{(start)}] action: [ (C {(exec)} {(DQ ($ VSub_Name '$browser_path'))} {(SQ <'"web-browse"'>)} {(DQ ($ VSub_At '$@'))} ) ] spids: [1254 1255 1273 16777215] ) (case_arm pat_list: [{(opera)} {(dillo)}] action: [ (Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1275 1278 1292 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(-n)} {(DQ ($ VSub_Name '$browser_cmd'))}) terminator: <Op_Semi ';'> ) ] action: [ (Subshell child: (C {(eval)} { (DQ ($ VSub_Name '$browser_cmd') (' ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('@') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) spids: [1312 1325] ) ] spids: [16777215 1309] ) ] spids: [16777215 1328] ) ] spids: [1294 1295 1331 16777215] ) ] spids: [988 994 1333] ) ] )