(command.CommandList
  children: [
    (command.FuncDef
      name: _puppet_logdest
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolUnary
                              op_id: BoolUnary_z
                              child: {($ VSub_DollarName '$cur')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'syslog console /'>)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                      op: Equal
                      rhs: 
                        {
                          (word_part.ArrayLiteralPart
                            words: [
                              {
                                (word_part.CommandSubPart
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (C {(compgen)} {(-W)} {(SQ <'syslog console'>)} {(--)} 
                                          {(DQ ($ VSub_DollarName '$cur'))}
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                )
                              }
                            ]
                          )
                        }
                    )
                  ]
                )
                (C {(_filedir)})
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: _puppet_digest
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:COMPREPLY)
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArrayLiteralPart
                        words: [
                          {
                            (word_part.CommandSubPart
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(compgen)} {(-W)} {(SQ <'MD5 MD2 SHA1 SHA256'>)} {(--)} 
                                      {(DQ ($ VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                            )
                          }
                        ]
                      )
                    }
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: _puppet_certs
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:puppetca)
                  op: Equal
                  rhs: {(DQ ('puppet cert'))}
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.SimpleCommand
                  words: [{(type)} {(puppetca)}]
                  redirects: [(redir.Redir op:<Redir_AndGreat '&>'> fd:16777215 arg_word:{(/dev/null)})]
                  more_env: [
                    (env_pair
                      name: PATH
                      val: 
                        {($ VSub_DollarName '$PATH') (Lit_Other ':') (/sbin) (Lit_Other ':') (/usr/sbin) 
                          (Lit_Other ':') (/usr/local/sbin)
                        }
                    )
                  ]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(lhs_expr.LhsName name:puppetca) op:Equal rhs:{(puppetca)})]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {(DQ ($ VSub_Number '$1'))}
                              right: {(--all)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:cert_list)
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {($ VSub_DollarName '$puppetca')} {(--list)} {(--all)})
                                          (C {(sed)} {(-e)} 
                                            {(SQ <'s/^[+-]\\?\\s*\\(\\S\\+\\)\\s\\+.*$/\\1/'>)}
                                          )
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:cert_list)
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSubPart
                            command_list: 
                              (command.CommandList
                                children: [(C {($ VSub_DollarName '$puppetca')} {(--list)})]
                              )
                            left_token: <Left_CommandSub '$('>
                          )
                        }
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:COMPREPLY)
                  op: PlusEqual
                  rhs: 
                    {
                      (word_part.ArrayLiteralPart
                        words: [
                          {
                            (word_part.CommandSubPart
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$cert_list'))} {(--)} 
                                      {(DQ ($ VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                            )
                          }
                        ]
                      )
                    }
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: _puppet_types
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:puppet_types)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(puppet)} {(describe)} {(--list)})
                                  (C {(sed)} {(-e)} {(SQ <'s/^\\(\\S\\+\\).*$/\\1/'>)})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                      )
                    }
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:COMPREPLY)
                  op: PlusEqual
                  rhs: 
                    {
                      (word_part.ArrayLiteralPart
                        words: [
                          {
                            (word_part.CommandSubPart
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$puppet_types'))} 
                                      {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                            )
                          }
                        ]
                      )
                    }
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: _puppet_references
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:puppetdoc)
                  op: Equal
                  rhs: {(DQ ('puppet doc'))}
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.SimpleCommand
                  words: [{(type)} {(puppetdoc)}]
                  redirects: [(redir.Redir op:<Redir_AndGreat '&>'> fd:16777215 arg_word:{(/dev/null)})]
                  more_env: [
                    (env_pair
                      name: PATH
                      val: 
                        {($ VSub_DollarName '$PATH') (Lit_Other ':') (/sbin) (Lit_Other ':') (/usr/sbin) 
                          (Lit_Other ':') (/usr/local/sbin)
                        }
                    )
                  ]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:puppetdoc)
                      op: Equal
                      rhs: {(puppetdoc)}
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:puppet_doc_list)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {($ VSub_DollarName '$puppetdoc')} {(--list)})
                                  (C {(sed)} {(-e)} {(SQ <'s/^\\(\\S\\+\\).*$/\\1/'>)})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                      )
                    }
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:COMPREPLY)
                  op: PlusEqual
                  rhs: 
                    {
                      (word_part.ArrayLiteralPart
                        words: [
                          {
                            (word_part.CommandSubPart
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$puppet_doc_list'))} 
                                      {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                            )
                          }
                        ]
                      )
                    }
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: _puppet_subcmd_opts
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalOr
                      left: (bool_expr.BoolUnary op_id:BoolUnary_z child:{($ VSub_DollarName '$cur')})
                      right: 
                        (bool_expr.BoolBinary
                          op_id: BoolBinary_GlobDEqual
                          left: {($ VSub_DollarName '$cur')}
                          right: {(-) (Lit_Other '*')}
                        )
                    )
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                      op: PlusEqual
                      rhs: 
                        {
                          (word_part.ArrayLiteralPart
                            words: [
                              {
                                (word_part.CommandSubPart
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (C {(compgen)} {(-W)} {(SQ <'$( _parse_usage "$1" "help $2" )'>)} 
                                          {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                )
                              }
                            ]
                          )
                        }
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.FuncDef
          name: _puppet
          body: 
            (command.BraceGroup
              children: [
                (command.Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(lhs_expr.LhsName name:cur) op:Equal)
                    (assign_pair lhs:(lhs_expr.LhsName name:prev) op:Equal)
                    (assign_pair lhs:(lhs_expr.LhsName name:words) op:Equal)
                    (assign_pair lhs:(lhs_expr.LhsName name:cword) op:Equal)
                  ]
                )
                (command.AndOr
                  ops: [Op_DPipe]
                  children: [
                    (C {(_init_completion)})
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                )
                (command.Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(lhs_expr.LhsName name:xspec) op:Equal)
                    (assign_pair lhs:(lhs_expr.LhsName name:helpopts) op:Equal)
                    (assign_pair lhs:(lhs_expr.LhsName name:subcommand) op:Equal)
                    (assign_pair lhs:(lhs_expr.LhsName name:action) op:Equal)
                  ]
                )
                (command.Case
                  to_match: {($ VSub_DollarName '$prev')}
                  arms: [
                    (case_arm
                      pat_list: [{(-h)} {(--help)} {(-V)} {(--version)}]
                      action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})]
                    )
                  ]
                )
                (command.Case
                  to_match: 
                    {
                      (word_part.BracedVarSub
                        token: <VSub_Name words>
                        bracket_op: 
                          (bracket_op.ArrayIndex
                            expr: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                          )
                      )
                    }
                  arms: [
                    (case_arm
                      pat_list: [{(puppetmasterd)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(master)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(puppetd)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(agent)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(puppetca)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(cert)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(ralsh)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(resource)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(puppetrun)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(kick)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(puppetqd)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(queue)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(filebucket)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(filebucket)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(puppetdoc)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(doc)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(pi)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:subcommand)
                              op: Equal
                              rhs: {(describe)}
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(puppet)}]
                      action: [
                        (command.Case
                          to_match: 
                            {
                              (word_part.BracedVarSub
                                token: <VSub_Name words>
                                bracket_op: 
                                  (bracket_op.ArrayIndex
                                    expr: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                  )
                              )
                            }
                          arms: [
                            (case_arm
                              pat_list: [
                                {(agent)}
                                {(apply)}
                                {(cert)}
                                {(describe)}
                                {(doc)}
                                {(filebucket)}
                                {(kick)}
                                {(master)}
                                {(parser)}
                                {(queue)}
                                {(resource)}
                              ]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:subcommand)
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.BracedVarSub
                                            token: <VSub_Name words>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                              )
                                          )
                                        }
                                    )
                                  ]
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*') (.pp)} {(Lit_Other '*') (.rb)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:subcommand)
                                      op: Equal
                                      rhs: {(apply)}
                                    )
                                  ]
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} 
                                                          {
                                                            (SQ <'agent apply cert describe doc\n'> 
                                                              <
'                      filebucket kick master parser queue resource'
                                                              >
                                                            )
                                                          } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (command.Case
                  to_match: {($ VSub_DollarName '$subcommand')}
                  arms: [
                    (case_arm
                      pat_list: [{(agent)}]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(--certname)}]
                              action: [
                                (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(--digest)}]
                              action: [
                                (C {(_puppet_digest)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(--fqdn)}]
                              action: [
                                (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(-l)} {(--logdest)}]
                              action: [
                                (C {(_puppet_logdest)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(--masterport)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} {(SQ <8140>)} {(--)} 
                                                          {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(-w)} {(--waitforcert)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} {(SQ <'0 15 30 60 120'>)} 
                                                          {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                                  {($ VSub_DollarName '$subcommand')}
                                )
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: PlusEqual
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} {(SQ <--no-daemonize>)} 
                                                          {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(apply)}]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(--catalog)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} {(SQ <->)} {(--)} 
                                                          {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (C {(_filedir)} {(json)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(--execute)}]
                              action: [
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(-l)} {(--logdest)}]
                              action: [
                                (C {(_puppet_logdest)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (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: [
                                        (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                                          {($ VSub_DollarName '$subcommand')}
                                        )
                                      ]
                                    )
                                  ]
                                  else_action: [(C {(_filedir)})]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(cert)}]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(--digest)}]
                              action: [
                                (C {(_puppet_digest)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:action)
                                      op: Equal
                                      rhs: {($ VSub_DollarName '$prev')}
                                    )
                                  ]
                                )
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} 
                                                          {
                                                            (SQ 
                                                              <
'--digest --debug --help --verbose --version'
                                                              >
                                                            )
                                                          } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.Case
                                  to_match: {($ VSub_DollarName '$action')}
                                  arms: [
                                    (case_arm
                                      pat_list: [
                                        {(fingerprint)}
                                        {(list)}
                                        {(verify)}
                                        {(--fingerprint)}
                                        {(--list)}
                                        {(--verify)}
                                      ]
                                      action: [
                                        (command.Assignment
                                          keyword: Assign_None
                                          pairs: [
                                            (assign_pair
                                              lhs: (lhs_expr.LhsName name:COMPREPLY)
                                              op: PlusEqual
                                              rhs: 
                                                {
                                                  (word_part.ArrayLiteralPart
                                                    words: [
                                                      {
                                                        (word_part.CommandSubPart
                                                          command_list: 
                                                            (command.CommandList
                                                              children: [
                                                                (C {(compgen)} {(-W)} {(SQ <--all>)} 
                                                                  {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                                )
                                                              ]
                                                            )
                                                          left_token: <Left_CommandSub '$('>
                                                        )
                                                      }
                                                    ]
                                                  )
                                                }
                                            )
                                          ]
                                        )
                                        (C {(_puppet_certs)} {(--all)})
                                        (command.ControlFlow
                                          token: <ControlFlow_Return return>
                                          arg_word: {(0)}
                                        )
                                      ]
                                    )
                                    (case_arm
                                      pat_list: [{(generate)} {(--generate)}]
                                      action: [
                                        (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))})
                                        (command.ControlFlow
                                          token: <ControlFlow_Return return>
                                          arg_word: {(0)}
                                        )
                                      ]
                                    )
                                    (case_arm
                                      pat_list: [
                                        {(clean)}
                                        {(print)}
                                        {(revoke)}
                                        {(--clean)}
                                        {(--print)}
                                        {(--revoke)}
                                      ]
                                      action: [
                                        (C {(_puppet_certs)} {(--all)})
                                        (command.ControlFlow
                                          token: <ControlFlow_Return return>
                                          arg_word: {(0)}
                                        )
                                      ]
                                    )
                                    (case_arm
                                      pat_list: [{(sign)} {(--sign)}]
                                      action: [
                                        (command.Assignment
                                          keyword: Assign_None
                                          pairs: [
                                            (assign_pair
                                              lhs: (lhs_expr.LhsName name:COMPREPLY)
                                              op: PlusEqual
                                              rhs: 
                                                {
                                                  (word_part.ArrayLiteralPart
                                                    words: [
                                                      {
                                                        (word_part.CommandSubPart
                                                          command_list: 
                                                            (command.CommandList
                                                              children: [
                                                                (C {(compgen)} {(-W)} {(SQ <--all>)} 
                                                                  {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                                )
                                                              ]
                                                            )
                                                          left_token: <Left_CommandSub '$('>
                                                        )
                                                      }
                                                    ]
                                                  )
                                                }
                                            )
                                          ]
                                        )
                                        (C {(_puppet_certs)})
                                        (command.ControlFlow
                                          token: <ControlFlow_Return return>
                                          arg_word: {(0)}
                                        )
                                      ]
                                    )
                                    (case_arm
                                      pat_list: [{(Lit_Other '*')}]
                                      action: [
                                        (command.Assignment
                                          keyword: Assign_None
                                          pairs: [
                                            (assign_pair
                                              lhs: (lhs_expr.LhsName name:COMPREPLY)
                                              op: PlusEqual
                                              rhs: 
                                                {
                                                  (word_part.ArrayLiteralPart
                                                    words: [
                                                      {
                                                        (word_part.CommandSubPart
                                                          command_list: 
                                                            (command.CommandList
                                                              children: [
                                                                (C {(compgen)} {(-W)} 
                                                                  {
                                                                    (SQ 
                                                                      <
'clean fingerprint generate\n'
                                                                      > <'                                list print revoke sign verify reinventory'>
                                                                    )
                                                                  } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                                )
                                                              ]
                                                            )
                                                          left_token: <Left_CommandSub '$('>
                                                        )
                                                      }
                                                    ]
                                                  )
                                                }
                                            )
                                          ]
                                        )
                                        (command.ControlFlow
                                          token: <ControlFlow_Return return>
                                          arg_word: {(0)}
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(describe)}]
                      action: [
                        (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                          {($ VSub_DollarName '$subcommand')}
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.BoolBinary
                                          op_id: BoolBinary_GlobNEqual
                                          left: {(DQ ($ VSub_DollarName '$cur'))}
                                          right: {(-) (Lit_Other '*')}
                                        )
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [(C {(_puppet_types)})]
                            )
                          ]
                        )
                        (command.ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(doc)}]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(-o)} {(--outputdir)}]
                              action: [
                                (C {(_filedir)} {(-d)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(-m)} {(--mode)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} 
                                                          {(SQ <'text trac pdf rdoc'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(-r)} {(--reference)}]
                              action: [
                                (C {(_puppet_references)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (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: [
                                        (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                                          {($ VSub_DollarName '$subcommand')}
                                        )
                                      ]
                                    )
                                  ]
                                  else_action: [(C {(_filedir)})]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(filebucket)}]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(-s)} {(--server)}]
                              action: [
                                (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(-b)} {(--bucket)}]
                              action: [
                                (C {(_filedir)} {(-d)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (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: [
                                        (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                                          {($ VSub_DollarName '$subcommand')}
                                        )
                                      ]
                                    )
                                  ]
                                  else_action: [
                                    (command.Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                                          op: Equal
                                          rhs: 
                                            {
                                              (word_part.ArrayLiteralPart
                                                words: [
                                                  {
                                                    (word_part.CommandSubPart
                                                      command_list: 
                                                        (command.CommandList
                                                          children: [
                                                            (C {(compgen)} {(-W)} 
                                                              {(SQ <'backup get restore'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                            )
                                                          ]
                                                        )
                                                      left_token: <Left_CommandSub '$('>
                                                    )
                                                  }
                                                ]
                                              )
                                            }
                                        )
                                      ]
                                    )
                                    (C {(_filedir)})
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(kick)}]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(-c)} {(--class)}]
                              action: [
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(--host)}]
                              action: [
                                (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(-t)} {(--tag)}]
                              action: [
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (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: [
                                        (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                                          {($ VSub_DollarName '$subcommand')}
                                        )
                                      ]
                                    )
                                  ]
                                  else_action: [
                                    (C {(_known_hosts_real)} {(DQ ($ VSub_DollarName '$cur'))})
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(master)}]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(-l)} {(--logdest)}]
                              action: [
                                (C {(_puppet_logdest)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                                  {($ VSub_DollarName '$subcommand')}
                                )
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: PlusEqual
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} {(SQ <--no-daemonize>)} 
                                                          {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(parser)}]
                      action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:action)
                              op: Equal
                              rhs: {($ VSub_DollarName '$prev')}
                            )
                          ]
                        )
                        (command.Case
                          to_match: {($ VSub_DollarName '$action')}
                          arms: [
                            (case_arm
                              pat_list: [{(validate)}]
                              action: [
                                (C {(_filedir)} {(pp)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(compgen)} {(-W)} {(SQ <validate>)} {(--)} 
                                                          {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                )
                                              }
                                            ]
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(queue)}]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(-l)} {(--logdest)}]
                              action: [
                                (C {(_puppet_logdest)})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (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: [
                                        (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                                          {($ VSub_DollarName '$subcommand')}
                                        )
                                      ]
                                    )
                                  ]
                                  else_action: [(C {(_filedir)})]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (case_arm
                      pat_list: [{(resource)} {(Lit_Other '*')}]
                      action: [
                        (C {(_puppet_subcmd_opts)} {(DQ ($ VSub_Number '$1'))} 
                          {($ VSub_DollarName '$subcommand')}
                        )
                        (command.ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
        )
        (C {(complete)} {(-F)} {(_puppet)} {(puppetmasterd)} {(puppetd)} {(puppetca)} {(ralsh)} {(puppetrun)} 
          {(puppetqd)} {(filebucket)} {(puppetdoc)} {(puppet)}
        )
      ]
    )
  ]
)