(command.AndOr
  children: [
    (command.ShFunction
      name_tok: <_p4>
      name: _p4
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<cur>} {<prev>} {<words>} {<cword>}]
              redirects: []
              do_fork: T
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <_init_completion>
                  more_env: []
                  words: [{<_init_completion>}]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Return return>)
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<p4commands>} {<p4filetypes>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'p4commands='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'p4commands='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p4commands='> name:p4commands)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Pipeline
                              children: [
                                (command.Simple
                                  blame_tok: <p4>
                                  more_env: []
                                  words: [{<p4>} {<help>} {<commands>}]
                                  redirects: [
                                    (Redir
                                      op: <Id.Redir_Great '2>'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <awk>
                                  more_env: []
                                  words: [{<awk>} {(SQ <'NF>3 {print $1}'>)}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              ops: [<Id.Op_Pipe _>]
                            )
                          right: <Id.Eof_RParen _>
                        )
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'p4filetypes='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'p4filetypes='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p4filetypes='> name:p4filetypes)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <'ctext cxtext ktext kxtext ltext tempobj ubinary '> 
                        <'        uresource uxbinary xbinary xltext xtempobj xtext '> <'        text binary resource'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_eq
                                  left: {($ Id.VSub_DollarName cword)}
                                  right: {<1>}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'COMPREPLY='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'COMPREPLY='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COMPREPLY='> name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (ShArrayLiteral
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Simple
                                          blame_tok: <compgen>
                                          more_env: []
                                          words: [
                                            {<compgen>}
                                            {<-W>}
                                            {(DQ ($ Id.VSub_DollarName p4commands))}
                                            {<-->}
                                            {(DQ ($ Id.VSub_DollarName cur))}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  }
                                ]
                                right: <Id.Right_ShArrayLiteral _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [81 94]
                )
                (IfArm
                  keyword: <Id.KW_Elif elif>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_eq
                                  left: {($ Id.VSub_DollarName cword)}
                                  right: {<2>}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Case
                      case_kw: <Id.KW_Case case>
                      to_match: (case_arg.Word w:{($ Id.VSub_DollarName prev)})
                      arms_start: <Id.KW_In in>
                      arms: [
                        (CaseArm
                          left: <help>
                          pattern: (pat.Words words:[{<help>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'COMPREPLY='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'COMPREPLY='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'COMPREPLY='>
                                      name: COMPREPLY
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (ShArrayLiteral
                                        left: <Id.Op_LParen _>
                                        words: [
                                          {
                                            (CommandSub
                                              left_token: <Id.Left_DollarParen '$('>
                                              child: 
                                                (command.Simple
                                                  blame_tok: <compgen>
                                                  more_env: []
                                                  words: [
                                                    {<compgen>}
                                                    {<-W>}
                                                    {
                                                      (DQ <'simple commands environment\n'> 
                                                        <
'                    filetypes jobview revisions usage views '
                                                        > ($ Id.VSub_DollarName p4commands)
                                                      )
                                                    }
                                                    {<-->}
                                                    {(DQ ($ Id.VSub_DollarName cur))}
                                                  ]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                              right: <Id.Eof_RParen _>
                                            )
                                          }
                                        ]
                                        right: <Id.Right_ShArrayLiteral _>
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <admin>
                          pattern: (pat.Words words:[{<admin>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'COMPREPLY='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'COMPREPLY='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'COMPREPLY='>
                                      name: COMPREPLY
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (ShArrayLiteral
                                        left: <Id.Op_LParen _>
                                        words: [
                                          {
                                            (CommandSub
                                              left_token: <Id.Left_DollarParen '$('>
                                              child: 
                                                (command.Simple
                                                  blame_tok: <compgen>
                                                  more_env: []
                                                  words: [
                                                    {<compgen>}
                                                    {<-W>}
                                                    {(DQ <'checkpoint stop'>)}
                                                    {<-->}
                                                    {(DQ ($ Id.VSub_DollarName cur))}
                                                  ]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                              right: <Id.Eof_RParen _>
                                            )
                                          }
                                        ]
                                        right: <Id.Right_ShArrayLiteral _>
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <Id.Lit_Star '*'>
                          pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                          middle: <Id.Right_CasePat _>
                          action: []
                          right: <Id.Op_DSemi _>
                        )
                      ]
                      arms_end: <Id.KW_Esac esac>
                      redirects: []
                    )
                  ]
                  spids: [121 134]
                )
                (IfArm
                  keyword: <Id.KW_Elif elif>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_gt
                                  left: {($ Id.VSub_DollarName cword)}
                                  right: {<2>}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Case
                      case_kw: <Id.KW_Case case>
                      to_match: (case_arg.Word w:{($ Id.VSub_DollarName prev)})
                      arms_start: <Id.KW_In in>
                      arms: [
                        (CaseArm
                          left: <-t>
                          pattern: (pat.Words words:[{<-t>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Case
                              case_kw: <Id.KW_Case case>
                              to_match: 
                                (case_arg.Word
                                  w: 
                                    {
                                      (BracedVarSub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Name words>
                                        var_name: words
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: 
                                              (arith_expr.Binary
                                                op_id: Id.Arith_Minus
                                                left: {($ Id.VSub_DollarName cword)}
                                                right: {<Id.Lit_Digits 2>}
                                              )
                                          )
                                        right: <Id.Right_DollarBrace '}'>
                                      )
                                    }
                                )
                              arms_start: <Id.KW_In in>
                              arms: [
                                (CaseArm
                                  left: <add>
                                  pattern: (pat.Words words:[{<add>} {<edit>} {<reopen>}])
                                  middle: <Id.Right_CasePat _>
                                  action: [
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'COMPREPLY='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'COMPREPLY='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'COMPREPLY='>
                                              name: COMPREPLY
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (ShArrayLiteral
                                                left: <Id.Op_LParen _>
                                                words: [
                                                  {
                                                    (CommandSub
                                                      left_token: <Id.Left_DollarParen '$('>
                                                      child: 
                                                        (command.Simple
                                                          blame_tok: <compgen>
                                                          more_env: []
                                                          words: [
                                                            {<compgen>}
                                                            {<-W>}
                                                            {(DQ ($ Id.VSub_DollarName p4filetypes))}
                                                            {<-->}
                                                            {(DQ ($ Id.VSub_DollarName cur))}
                                                          ]
                                                          redirects: []
                                                          do_fork: T
                                                        )
                                                      right: <Id.Eof_RParen _>
                                                    )
                                                  }
                                                ]
                                                right: <Id.Right_ShArrayLiteral _>
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  right: <Id.Op_DSemi _>
                                )
                                (CaseArm
                                  left: <Id.Lit_Star '*'>
                                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                                  middle: <Id.Right_CasePat _>
                                  action: []
                                  right: <Id.Op_DSemi _>
                                )
                              ]
                              arms_end: <Id.KW_Esac esac>
                              redirects: []
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <Id.Lit_Star '*'>
                          pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                          middle: <Id.Right_CasePat _>
                          action: []
                          right: <Id.Op_DSemi _>
                        )
                      ]
                      arms_end: <Id.KW_Esac esac>
                      redirects: []
                    )
                  ]
                  spids: [220 233]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <complete>
      more_env: []
      words: [{<complete>} {<-F>} {<_p4>} {<-o>} {<default>} {<p4>} {<g4>}]
      redirects: []
      do_fork: T
    )
  ]
  ops: [<Id.Op_DAmp _>]
)