(command.CommandList children: [ (command.ShFunction name: _pg_databases body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<compgen>} {<-W>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.Simple words: [ {<psql>} {<-XAtqwlF>} { (single_quoted left: <Id.Left_SingleQuoteC "$'"> tokens: [<Id.Char_OneChar '\\t'>] ) } ] redirects: [ (redir.Redir op: <Id.Redir_Great '2>'> fd: 2 arg_word: {</dev/null>} ) ] ) (C {<awk>} {(SQ <'NF > 1 { print $1 }'>)}) ] negated: F ) ] ) ) ) } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [19] ) ] ) ] ) ) (command.ShFunction name: _pg_users body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<compgen>} {<-W>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<psql>} {<-XAtqwc>} {(SQ <'select usename from pg_user'>)} {<template1>} ] redirects: [ (redir.Redir op: <Id.Redir_Great '2>'> fd: 2 arg_word: {</dev/null>} ) ] ) ] ) ) ) } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [79] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: { (braced_var_sub token: <Id.VSub_Name COMPREPLY> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: {<0>} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<compgen>} {<-u>} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}) ] ) ) } ] ) } spids: [138] ) ] ) ] ) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _createdb body: (command.BraceGroup children: [ (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<_init_completion>} {<-s>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{<-h>} {<--host>}] action: [ (C {<_known_hosts_real>} {(DQ ($ Id.VSub_DollarName '$cur'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [203 206 221 -1] ) (case_arm pat_list: [{<-U>} {<--username>} {<-O>} {<--owner>}] action: [ (C {<_pg_users>}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [224 231 242 -1] ) (case_arm pat_list: [ {<-p>} {<--port>} {<-D>} {<--tablespace>} {<-E>} {<--encoding>} {<-T>} {<--template>} ] action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [245 260 272 -1] ) (case_arm pat_list: [{<--help>} {<--version>}] action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [275 278 290 -1] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$split')}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {<-> <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<compgen>} {<-W>} {(SQ <'$( _parse_help "$1" )'>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [326] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$COMPREPLY')} right: {<Id.Lit_Other '*'> <Id.BoolBinary_GlobEqual '='>} ) ) (C {<compopt>} {<-o>} {<nospace>}) ] ) ] spids: [307 323] ) ] else_action: [(C {<_pg_databases>})] ) ] ) ) (C {<complete>} {<-F>} {<_createdb>} {<createdb>}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _createuser body: (command.BraceGroup children: [ (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<_init_completion>} {<-s>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{<--help>} {<--version>} {<-p>} {<--port>} {<-c>} {<--connection-limit>}] action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)] spids: [434 445 451 -1] ) (case_arm pat_list: [{<-h>} {<--host>}] action: [ (C {<_known_hosts_real>} {(DQ ($ Id.VSub_DollarName '$cur'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] spids: [454 457 470 -1] ) (case_arm pat_list: [{<-U>} {<--username>}] action: [ (C {<_pg_users>}) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] spids: [473 476 485 -1] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$split')}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {<-> <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<compgen>} {<-W>} {(SQ <'$( _parse_help "$1" )'>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [519] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$COMPREPLY')} right: {<Id.Lit_Other '*'> <Id.BoolBinary_GlobEqual '='>} ) ) (C {<compopt>} {<-o>} {<nospace>}) ] ) ] spids: [500 516] ) ] ) ] ) ) (C {<complete>} {<-F>} {<_createuser>} {<createuser>}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _dropdb body: (command.BraceGroup children: [ (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<_init_completion>} {<-s>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{<-h>} {<--host>}] action: [ (C {<_known_hosts_real>} {(DQ ($ Id.VSub_DollarName '$cur'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [621 624 639 -1] ) (case_arm pat_list: [{<-U>} {<--username>}] action: [ (C {<_pg_users>}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [642 645 656 -1] ) (case_arm pat_list: [{<--help>} {<--version>}] action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [659 662 674 -1] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$split')}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {<-> <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<compgen>} {<-W>} {(SQ <'$( _parse_help "$1" )'>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [710] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$COMPREPLY')} right: {<Id.Lit_Other '*'> <Id.BoolBinary_GlobEqual '='>} ) ) (C {<compopt>} {<-o>} {<nospace>}) ] ) ] spids: [691 707] ) ] else_action: [(C {<_pg_databases>})] ) ] ) ) (C {<complete>} {<-F>} {<_dropdb>} {<dropdb>}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _dropuser body: (command.BraceGroup children: [ (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<_init_completion>} {<-s>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{<--help>} {<--version>} {<-p>} {<--port>}] action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)] spids: [818 825 831 -1] ) (case_arm pat_list: [{<-h>} {<--host>}] action: [ (C {<_known_hosts_real>} {(DQ ($ Id.VSub_DollarName '$cur'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] spids: [834 837 850 -1] ) (case_arm pat_list: [{<-U>} {<--username>}] action: [ (C {<_pg_users>}) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] spids: [853 856 865 -1] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$split')}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {<-> <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<compgen>} {<-W>} {(SQ <'$( _parse_help "$1" )'>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [899] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$COMPREPLY')} right: {<Id.Lit_Other '*'> <Id.BoolBinary_GlobEqual '='>} ) ) (C {<compopt>} {<-o>} {<nospace>}) ] ) ] spids: [880 896] ) ] else_action: [(C {<_pg_users>})] ) ] ) ) (C {<complete>} {<-F>} {<_dropuser>} {<dropuser>}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _psql body: (command.BraceGroup children: [ (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<_init_completion>} {<-s>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{<-h>} {<--host>}] action: [ (C {<_known_hosts_real>} {(DQ ($ Id.VSub_DollarName '$cur'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1007 1010 1025 -1] ) (case_arm pat_list: [{<-U>} {<--username>}] action: [ (C {<_pg_users>}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1028 1031 1042 -1] ) (case_arm pat_list: [{<-d>} {<--dbname>}] action: [ (C {<_pg_databases>}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1045 1048 1059 -1] ) (case_arm pat_list: [{<-o>} {<--output>} {<-f>} {<--file>} {<-L>} {<--log-file>}] action: [ (C {<_filedir>}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1062 1073 1084 -1] ) (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: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1087 1118 1130 -1] ) (case_arm pat_list: [ {<-> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'>)} {<--help>} {<-V>} {<--version>} ] action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1133 1141 1153 -1] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {($ Id.VSub_DollarName '$split')}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {<-> <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<compgen>} {<-W>} {(SQ <'$( _parse_help "$1" )'>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [1193] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$COMPREPLY')} right: {<Id.Lit_Other '*'> <Id.BoolBinary_GlobEqual '='>} ) ) (C {<compopt>} {<-o>} {<nospace>}) ] ) ] spids: [1170 1186] ) ] else_action: [(C {<_pg_databases>})] ) ] ) ) (C {<complete>} {<-F>} {<_psql>} {<psql>}) ] ) ] )