(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:USAGE spids:[60]) op: Equal rhs: {(SQ <'[--browser=browser|--tool=browser] [--config=conf.var] url/file ...'>)} spids: [60] ) ] spids: [60] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:NONGIT_OK spids:[72]) op: Equal rhs: {(Yes)} spids: [72] ) ] spids: [72] ) (C {(.)} {(git-sh-setup)}) (command.FuncDef name: valid_custom_tool body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_cmd spids:[87]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(config)} {(DQ (browser.) ($ VSub_Number '$1') (.cmd))}) ] ) left_token: <Left_CommandSub '$('> spids: [89 99] ) ) } spids: [87] ) ] spids: [87] ) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$browser_cmd'))}) ] spids: [84] ) spids: [80 83] ) (command.FuncDef name: valid_tool body: (command.BraceGroup children: [ (command.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: [130 209 212 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(valid_custom_tool)} {(DQ ($ VSub_Number '$1'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] spids: [218 219 235 16777215] ) ] spids: [121 127 238] ) ] spids: [118] ) spids: [114 117] ) (command.FuncDef name: init_browser_path body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_path spids:[250]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(config)} {(DQ (browser.) ($ VSub_Number '$1') (.path))}) ] ) left_token: <Left_CommandSub '$('> spids: [251 261] ) } spids: [250] ) ] spids: [250] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser_path'))}) (C {(test)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(chromium)}) (command.SimpleCommand words: [{(type)} {(chromium-browser)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) ] ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_path spids:[304]) op: Equal rhs: {(chromium-browser)} spids: [304] ) ] spids: [304] ) ] spids: [16777215 301] ) ] spids: [16777215 308] ) (C {(Lit_Other ':')} { (word_part.BracedVarSub token: <VSub_Name browser_path> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonEquals arg_word: {(DQ ($ VSub_Number '$1'))} ) spids: [313 319] ) } ) ] spids: [247] ) spids: [243 246] ) (command.WhileUntil keyword: <KW_While while> cond: [(C {(test)} {($ VSub_Pound '$#')} {(KW_Bang '!') (Lit_Other '=')} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-b)} {(--browser) (Lit_Other '*')} {(-t)} {(--tool) (Lit_Other '*')}] action: [ (command.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: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser spids:[378]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Number '$1'))} {(Lit_Other ':')} {(SQ <'z-[^=]*=\\(.*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [379 392] ) } spids: [378] ) ] spids: [378] ) ] spids: [370 375 395 16777215] ) (case_arm pat_list: [{(1) (Lit_Comma ',') (Lit_Other '*')}] action: [(C {(usage)})] spids: [398 401 406 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser spids:[413]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [413] ) ] spids: [413] ) (C {(shift)}) ] spids: [409 410 421 16777215] ) ] spids: [359 367 424] ) ] spids: [347 356 427 16777215] ) (case_arm pat_list: [{(-c)} {(--config) (Lit_Other '*')}] action: [ (command.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: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:conf spids:[456]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(expr)} {(DQ (z) ($ VSub_Number '$1'))} {(Lit_Other ':')} {(SQ <'z-[^=]*=\\(.*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [457 470] ) } spids: [456] ) ] spids: [456] ) ] spids: [448 453 473 16777215] ) (case_arm pat_list: [{(1) (Lit_Comma ',') (Lit_Other '*')}] action: [(C {(usage)})] spids: [476 479 484 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:conf spids:[491]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [491] ) ] spids: [491] ) (C {(shift)}) ] spids: [487 488 499 16777215] ) ] spids: [437 445 502] ) ] spids: [430 434 505 16777215] ) (case_arm pat_list: [{(--)}] action: [(command.ControlFlow token:<ControlFlow_Break break>)] spids: [508 509 515 16777215] ) (case_arm pat_list: [{(-) (Lit_Other '*')}] action: [(C {(usage)})] spids: [518 520 526 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(command.ControlFlow token:<ControlFlow_Break break>)] spids: [529 530 536 16777215] ) ] spids: [338 344 539] ) (C {(shift)}) ] spids: [335 544] ) ) (command.AndOr ops: [Op_DAmp] children: [(C {(test)} {($ VSub_Pound '$#')} {(Lit_Other '=')} {(0)}) (C {(usage)})] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser'))})] action: [ (command.ForEach iter_name: opt iter_words: [{(DQ ($ VSub_Name '$conf'))} {(DQ (web.browser))}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$opt'))}) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser spids:[604]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {($ VSub_Name '$opt')})] ) left_token: <Left_CommandSub '$('> spids: [606 612] ) ) } spids: [604] ) ] spids: [604] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser'))}) (command.ControlFlow token:<ControlFlow_Break break>) ] ) ] spids: [588 629] ) spids: [578 16777215] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$browser'))}) (command.Pipeline children: [(C {(valid_tool)} {(DQ ($ VSub_Name '$browser'))})] negated: T ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ('git config option ') ($ VSub_Name '$opt') (' set to unknown browser: ') ($ VSub_Name '$browser') ) } ] 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)})] ) (C {(unset)} {(browser)}) ] spids: [16777215 653] ) ] spids: [16777215 684] ) ] spids: [16777215 570] ) ] spids: [16777215 686] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser'))}) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-n)} {(DQ ($ VSub_Name '$DISPLAY'))}) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_candidates spids:[718]) op: Equal rhs: { (DQ ( 'firefox iceweasel google-chrome chrome chromium chromium-browser konqueror opera seamonkey iceape w3m elinks links lynx dillo xdg-open' ) ) } spids: [718] ) ] spids: [718] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ VSub_Name '$KDE_FULL_SESSION'))} {(Lit_Other '=')} {(DQ (true))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_candidates spids:[742]) op: Equal rhs: {(DQ ('konqueror ') ($ VSub_Name '$browser_candidates'))} spids: [742] ) ] spids: [742] ) ] spids: [16777215 739] ) ] spids: [16777215 749] ) ] spids: [16777215 715] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_candidates spids:[755]) op: Equal rhs: {(DQ ('w3m elinks links lynx'))} spids: [755] ) ] spids: [755] ) ] spids: [752 761] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$SECURITYSESSIONID'))}) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$TERM_PROGRAM'))}) ] ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_candidates spids:[792]) op: Equal rhs: {(DQ ('open ') ($ VSub_Name '$browser_candidates'))} spids: [792] ) ] spids: [792] ) ] spids: [16777215 789] ) ] spids: [16777215 799] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-x)} {(/bin/start)}) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_candidates spids:[818]) op: Equal rhs: {(DQ ('start ') ($ VSub_Name '$browser_candidates'))} spids: [818] ) ] spids: [818] ) ] spids: [16777215 815] ) ] spids: [16777215 825] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-x)} {(/usr/bin/cygstart)}) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_candidates spids:[844]) op: Equal rhs: {(DQ ('cygstart ') ($ VSub_Name '$browser_candidates'))} spids: [844] ) ] spids: [844] ) ] spids: [16777215 841] ) ] spids: [16777215 851] ) (command.ForEach iter_name: i iter_words: [{($ VSub_Name '$browser_candidates')}] do_arg_iter: F body: (command.DoGroup children: [ (C {(init_browser_path)} {($ VSub_Name '$i')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.SimpleCommand words: [{(type)} {(DQ ($ VSub_Name '$browser_path'))}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser spids:[891]) op: Equal rhs: {($ VSub_Name '$i')} spids: [891] ) ] spids: [891] ) (command.ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 888] ) ] spids: [16777215 898] ) ] spids: [864 901] ) spids: [860 862] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser'))}) (C {(die)} {(DQ ('No known browser available.'))}) ] ) ] spids: [16777215 701] ) ] else_action: [ (command.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'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$browser_cmd'))}) (command.Pipeline children: [ (command.SimpleCommand words: [{(type)} {(DQ ($ VSub_Name '$browser_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 ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(die)} { (DQ ('The browser ') ($ VSub_Name '$browser') (" is not available as '") ($ VSub_Name '$browser_path') ("'.") ) } ) ] spids: [16777215 977] ) ] spids: [16777215 991] ) ] spids: [920 993] ) (command.Case to_match: {(DQ ($ VSub_Name '$browser'))} arms: [ (case_arm pat_list: [{(firefox)} {(iceweasel)} {(seamonkey)} {(iceape)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:vers spids:[1018]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(expr)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {($ VSub_Name '$browser_path')} {(-version)})] ) left_token: <Left_CommandSub '$('> spids: [1023 1027] ) ) } {(Lit_Other ':')} {(SQ <'.* \\([0-9][0-9]*\\)\\..*'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [1019 1035] ) } spids: [1018] ) ] spids: [1018] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:NEWTAB spids:[1038]) op: Equal rhs: {(SQ <-new-tab>)} spids: [1038] ) ] spids: [1038] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(DQ ($ VSub_Name '$vers'))} {(-lt)} {(2)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:NEWTAB spids:[1056]) op: Equal rhs: {(SQ )} spids: [1056] ) ] spids: [1056] ) ] ) (command.Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {($ VSub_Name '$NEWTAB')} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1004 1011 1074 16777215] ) (case_arm pat_list: [{(google-chrome)} {(chrome)} {(chromium)} {(chromium-browser)}] action: [ (command.Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1076 1083 1101 16777215] ) (case_arm pat_list: [{(konqueror)}] action: [ (command.Case to_match: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(basename)} {(DQ ($ VSub_Name '$browser_path'))})] ) left_token: <Left_CommandSub '$('> spids: [1110 1116] ) ) } arms: [ (case_arm pat_list: [{(konqueror)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser_path spids:[1130]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$browser_path'))}) (C {(sed)} {(-e)} {(SQ <'s/konqueror$/kfmclient/'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1132 1148] ) ) } spids: [1130] ) ] spids: [1130] ) (command.AndOr ops: [Op_DPipe] children: [ (command.SimpleCommand words: [{(type)} {(DQ ($ VSub_Name '$browser_path'))}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) (C {(die)} {(DQ ("No '") ($ VSub_Name '$browser_path') ("' found."))}) ] ) (command.Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(newTab)} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1122 1123 1189 16777215] ) (case_arm pat_list: [{(kfmclient)}] action: [ (command.Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(newTab)} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1192 1193 1209 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1212 1213 1227 16777215] ) ] spids: [1107 1119 1230] ) ] spids: [1103 1104 1233 16777215] ) (case_arm pat_list: [{(w3m)} {(elinks)} {(links)} {(lynx)} {(open)} {(cygstart)} {(xdg-open)}] action: [(C {(DQ ($ VSub_Name '$browser_path'))} {(DQ ($ VSub_At '$@'))})] spids: [1235 1248 1260 16777215] ) (case_arm pat_list: [{(start)}] action: [ (C {(exec)} {(DQ ($ VSub_Name '$browser_path'))} {(SQ <'"web-browse"'>)} {(DQ ($ VSub_At '$@'))} ) ] spids: [1262 1263 1281 16777215] ) (case_arm pat_list: [{(opera)} {(dillo)}] action: [ (command.Sentence child: (C {(DQ ($ VSub_Name '$browser_path'))} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Amp '&'> ) ] spids: [1283 1286 1300 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-n)} {(DQ ($ VSub_Name '$browser_cmd'))}) terminator: <Op_Semi ';'> ) ] action: [ (command.Subshell child: (C {(eval)} { (DQ ($ VSub_Name '$browser_cmd') (' ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('@') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) spids: [1320 1333] ) ] spids: [16777215 1317] ) ] spids: [16777215 1336] ) ] spids: [1302 1303 1339 16777215] ) ] spids: [996 1002 1341] ) ] )