(command.CommandList children: [ (command.FuncDef name: _pg_databases body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[19]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.SimpleCommand words: [ {(psql)} {(-XAtqwlF)} { (word_part.SingleQuotedPart left: <Left_DollarSingleQuote "$'"> tokens: [<Char_OneChar '\\t'>] spids: [35 37] ) } ] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(awk)} {(SQ <'NF > 1 { print $1 }'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [29 52] ) ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [22 61] ) } ] ) } spids: [19] ) ] spids: [19] ) ] spids: [8] ) spids: [4 7] ) (command.FuncDef name: _pg_users body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[79]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand words: [ {(psql)} {(-XAtqwc)} {(SQ <'select usename from pg_user'>)} {(template1)} ] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [89 106] ) ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [82 115] ) } ] ) } spids: [79] ) ] spids: [79] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_eq left: { (word_part.BracedVarSub token: <VSub_Name COMPREPLY> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) spids: [122 128] ) } right: {(0)} ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[138]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-u)} {(--)} {(DQ ($ VSub_DollarName '$cur'))}) ] ) left_token: <Left_CommandSub '$('> spids: [141 153] ) } ] ) } spids: [138] ) ] spids: [138] ) ] ) ] spids: [72] ) spids: [68 71] ) (command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _createdb body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[175]) op: Equal spids: [175] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[177]) op: Equal spids: [177] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[179]) op: Equal spids: [179] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[181]) op: Equal spids: [181] ) (assign_pair lhs: (lhs_expr.LhsName name:split spids:[183]) op: Equal spids: [183] ) ] spids: [173] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)} {(-s)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Case to_match: {($ VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(-h)} {(--host)}] action: [ (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [203 206 221 16777215] ) (case_arm pat_list: [{(-U)} {(--username)} {(-O)} {(--owner)}] action: [ (C {(_pg_users)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [224 231 242 16777215] ) (case_arm pat_list: [ {(-p)} {(--port)} {(-D)} {(--tablespace)} {(-E)} {(--encoding)} {(-T)} {(--template)} ] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [245 260 272 16777215] ) (case_arm pat_list: [{(--help)} {(--version)}] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [275 278 290 16777215] ) ] spids: [196 200 293] ) (command.AndOr ops: [Op_DAmp] children: [ (C {($ VSub_DollarName '$split')}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(-) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[326]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'$( _parse_help "$1" )'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [329 345] ) } ] ) } spids: [326] ) ] spids: [326] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$COMPREPLY')} right: {(Lit_Other '*') (BoolBinary_GlobEqual '=')} ) ) (C {(compopt)} {(-o)} {(nospace)}) ] ) ] spids: [16777215 323] ) ] else_action: [(C {(_pg_databases)})] spids: [370 376] ) ] spids: [170] ) spids: [166 169] ) (C {(complete)} {(-F)} {(_createdb)} {(createdb)}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _createuser body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[406]) op: Equal spids: [406] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[408]) op: Equal spids: [408] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[410]) op: Equal spids: [410] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[412]) op: Equal spids: [412] ) (assign_pair lhs: (lhs_expr.LhsName name:split spids:[414]) op: Equal spids: [414] ) ] spids: [404] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)} {(-s)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Case to_match: {($ VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(--help)} {(--version)} {(-p)} {(--port)} {(-c)} {(--connection-limit)}] action: [(command.ControlFlow token:<ControlFlow_Return return>)] spids: [434 445 451 16777215] ) (case_arm pat_list: [{(-h)} {(--host)}] action: [ (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))}) (command.ControlFlow token: <ControlFlow_Return return> ) ] spids: [454 457 470 16777215] ) (case_arm pat_list: [{(-U)} {(--username)}] action: [ (C {(_pg_users)}) (command.ControlFlow token: <ControlFlow_Return return> ) ] spids: [473 476 485 16777215] ) ] spids: [427 431 488] ) (command.AndOr ops: [Op_DAmp] children: [ (C {($ VSub_DollarName '$split')}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(-) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[519]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'$( _parse_help "$1" )'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [522 538] ) } ] ) } spids: [519] ) ] spids: [519] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$COMPREPLY')} right: {(Lit_Other '*') (BoolBinary_GlobEqual '=')} ) ) (C {(compopt)} {(-o)} {(nospace)}) ] ) ] spids: [16777215 516] ) ] spids: [16777215 563] ) ] spids: [401] ) spids: [397 400] ) (C {(complete)} {(-F)} {(_createuser)} {(createuser)}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _dropdb body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[593]) op: Equal spids: [593] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[595]) op: Equal spids: [595] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[597]) op: Equal spids: [597] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[599]) op: Equal spids: [599] ) (assign_pair lhs: (lhs_expr.LhsName name:split spids:[601]) op: Equal spids: [601] ) ] spids: [591] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)} {(-s)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Case to_match: {($ VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(-h)} {(--host)}] action: [ (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [621 624 639 16777215] ) (case_arm pat_list: [{(-U)} {(--username)}] action: [ (C {(_pg_users)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [642 645 656 16777215] ) (case_arm pat_list: [{(--help)} {(--version)}] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [659 662 674 16777215] ) ] spids: [614 618 677] ) (command.AndOr ops: [Op_DAmp] children: [ (C {($ VSub_DollarName '$split')}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(-) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[710]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'$( _parse_help "$1" )'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [713 729] ) } ] ) } spids: [710] ) ] spids: [710] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$COMPREPLY')} right: {(Lit_Other '*') (BoolBinary_GlobEqual '=')} ) ) (C {(compopt)} {(-o)} {(nospace)}) ] ) ] spids: [16777215 707] ) ] else_action: [(C {(_pg_databases)})] spids: [754 760] ) ] spids: [588] ) spids: [584 587] ) (C {(complete)} {(-F)} {(_dropdb)} {(dropdb)}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _dropuser body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[790]) op: Equal spids: [790] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[792]) op: Equal spids: [792] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[794]) op: Equal spids: [794] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[796]) op: Equal spids: [796] ) (assign_pair lhs: (lhs_expr.LhsName name:split spids:[798]) op: Equal spids: [798] ) ] spids: [788] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)} {(-s)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Case to_match: {($ VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(--help)} {(--version)} {(-p)} {(--port)}] action: [(command.ControlFlow token:<ControlFlow_Return return>)] spids: [818 825 831 16777215] ) (case_arm pat_list: [{(-h)} {(--host)}] action: [ (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))}) (command.ControlFlow token: <ControlFlow_Return return> ) ] spids: [834 837 850 16777215] ) (case_arm pat_list: [{(-U)} {(--username)}] action: [ (C {(_pg_users)}) (command.ControlFlow token: <ControlFlow_Return return> ) ] spids: [853 856 865 16777215] ) ] spids: [811 815 868] ) (command.AndOr ops: [Op_DAmp] children: [ (C {($ VSub_DollarName '$split')}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(-) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[899]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'$( _parse_help "$1" )'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [902 918] ) } ] ) } spids: [899] ) ] spids: [899] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$COMPREPLY')} right: {(Lit_Other '*') (BoolBinary_GlobEqual '=')} ) ) (C {(compopt)} {(-o)} {(nospace)}) ] ) ] spids: [16777215 896] ) ] else_action: [(C {(_pg_users)})] spids: [943 949] ) ] spids: [785] ) spids: [781 784] ) (C {(complete)} {(-F)} {(_dropuser)} {(dropuser)}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _psql body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[979]) op: Equal spids: [979] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[981]) op: Equal spids: [981] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[983]) op: Equal spids: [983] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[985]) op: Equal spids: [985] ) (assign_pair lhs: (lhs_expr.LhsName name:split spids:[987]) op: Equal spids: [987] ) ] spids: [977] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)} {(-s)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Case to_match: {($ VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(-h)} {(--host)}] action: [ (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [1007 1010 1025 16777215] ) (case_arm pat_list: [{(-U)} {(--username)}] action: [ (C {(_pg_users)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [1028 1031 1042 16777215] ) (case_arm pat_list: [{(-d)} {(--dbname)}] action: [ (C {(_pg_databases)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [1045 1048 1059 16777215] ) (case_arm pat_list: [{(-o)} {(--output)} {(-f)} {(--file)} {(-L)} {(--log-file)}] action: [ (C {(_filedir)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [1062 1073 1084 16777215] ) (case_arm pat_list: [ {(-c)} {(--command)} {(-F)} {(--field-separator)} {(-p)} {(--port)} {(-P)} {(--pset)} {(-R)} {(--record-separator)} {(-T)} {(--table-attr)} {(-v)} {(--set)} {(--variable)} ] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [1087 1118 1130 16777215] ) (case_arm pat_list: [ {(-) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\?'>)} {(--help)} {(-V)} {(--version)} ] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [1133 1141 1153 16777215] ) ] spids: [1000 1004 1156] ) (command.AndOr ops: [Op_DAmp] children: [ (C {($ VSub_DollarName '$split')}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(-) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[1193]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'$( _parse_help "$1" )'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [1196 1212] ) } ] ) } spids: [1193] ) ] spids: [1193] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$COMPREPLY')} right: {(Lit_Other '*') (BoolBinary_GlobEqual '=')} ) ) (C {(compopt)} {(-o)} {(nospace)}) ] ) ] spids: [16777215 1186] ) ] else_action: [(C {(_pg_databases)})] spids: [1237 1247] ) ] spids: [974] ) spids: [970 973] ) (C {(complete)} {(-F)} {(_psql)} {(psql)}) ] ) ] )