(CommandList
  children: [
    (FuncDef
      name: _ri_get_methods
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:regex) op:Equal spids:[16])]
              spids: [14]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {($ VSub_Name '$ri_version')}
                              right: {(integrated)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolUnary
                                      op_id: BoolUnary_z
                                      child: {($ VSub_Name '$separator')}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:regex)
                                  op: Equal
                                  rhs: {(DQ ('(Instance|Class)'))}
                                  spids: [50]
                                )
                              ]
                              spids: [50]
                            )
                          ]
                          spids: [16777215 47]
                        )
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: {($ VSub_Name '$separator')}
                                      right: {(DQ ('#'))}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:regex)
                                  op: Equal
                                  rhs: {(Instance)}
                                  spids: [74]
                                )
                              ]
                              spids: [74]
                            )
                          ]
                          spids: [56 71]
                        )
                      ]
                      else_action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:regex)
                              op: Equal
                              rhs: {(Class)}
                              spids: [81]
                            )
                          ]
                          spids: [81]
                        )
                      ]
                      spids: [78 85]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: PlusEqual
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (DQ 
                                      (CommandSubPart
                                        command_list: 
                                          (CommandList
                                            children: [
                                              (Pipeline
                                                children: [
                                                  (SimpleCommand
                                                    words: [
                                                      {(ri)}
                                                      {
                                                        (BracedVarSub
                                                          token: <VSub_Name classes>
                                                          bracket_op: (WholeArray op_id:Lit_At)
                                                          spids: [99 104]
                                                        )
                                                      }
                                                    ]
                                                    redirects: [
                                                      (Redir
                                                        op_id: Redir_Great
                                                        fd: 2
                                                        arg_word: {(/dev/null)}
                                                        spids: [106]
                                                      )
                                                    ]
                                                  )
                                                  (SimpleCommand
                                                    words: [
                                                      {(ruby)}
                                                      {(-ane)}
                                                      {(SQ <'if /^'>) (DQ ($ VSub_Name '$regex')) 
                                                        (SQ 
                                                          <
' methods:/.../^------------------|^$/ and \\\n'
                                                          > <'            /^ / then print $_.split(/, |,$/).grep(/^[^\\[]*$/).join("\\n"); \\\n'> 
                                                          <'            end'>
                                                        )
                                                      }
                                                    ]
                                                    redirects: [
                                                      (Redir
                                                        op_id: Redir_Great
                                                        fd: 2
                                                        arg_word: {(/dev/null)}
                                                        spids: [129]
                                                      )
                                                    ]
                                                  )
                                                  (C {(sort)} {(-u)})
                                                ]
                                                negated: False
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                        spids: [95 138]
                                      )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [89]
                        )
                      ]
                      spids: [89]
                    )
                  ]
                  spids: [16777215 33]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:COMPREPLY)
                      op: PlusEqual
                      rhs: 
                        {
                          (ArrayLiteralPart
                            words: [
                              {
                                (DQ 
                                  (CommandSubPart
                                    command_list: 
                                      (CommandList
                                        children: [
                                          (Pipeline
                                            children: [
                                              (C {(ruby)} {(-W0)} {($ VSub_Name '$ri_path')} 
                                                {
                                                  (BracedVarSub
                                                    token: <VSub_Name classes>
                                                    bracket_op: (WholeArray op_id:Lit_At)
                                                    spids: [169 174]
                                                  )
                                                }
                                              )
                                              (C {(ruby)} {(-ane)} 
                                                {
                                                  (SQ 
                                                    <
'if /^-/.../^-/ and ! /^-/ and ! /^ +(class|module): / then \\\n'
                                                    > <'            print $_.split(/, |,$| +/).grep(/^[^\\[]*$/).join("\\n"); \\\n'> <'            end'>
                                                  )
                                                }
                                              )
                                              (C {(sort)} {(-u)})
                                            ]
                                            negated: False
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub '$('>
                                    spids: [161 196]
                                  )
                                )
                              }
                            ]
                          )
                        }
                      spids: [155]
                    )
                  ]
                  spids: [155]
                )
              ]
              spids: [144 202]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:COMPREPLY)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [
                                    (C {(compgen)} {($ VSub_Name '$prefix')} {(-W)} 
                                      {(SQ <'${COMPREPLY[@]}'>)} {(--)} {($ VSub_Name '$method')}
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [208 224]
                            )
                          }
                        ]
                      )
                    }
                  spids: [205]
                )
              ]
              spids: [205]
            )
          ]
          spids: [11]
        )
      spids: [7 10]
    )
    (AndOr
      children: [
        (FuncDef
          name: _ri
          body: 
            (BraceGroup
              children: [
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:cur) op:Equal spids:[243])
                    (assign_pair lhs:(LhsName name:prev) op:Equal spids:[245])
                    (assign_pair lhs:(LhsName name:words) op:Equal spids:[247])
                    (assign_pair lhs:(LhsName name:cword) op:Equal spids:[249])
                  ]
                  spids: [241]
                )
                (AndOr
                  children: [
                    (C {(_init_completion)} {(-n)} {(Lit_Other ':')})
                    (ControlFlow token:<ControlFlow_Return return>)
                  ]
                  op_id: Op_DPipe
                )
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:class) op:Equal spids:[266])
                    (assign_pair lhs:(LhsName name:method) op:Equal spids:[268])
                    (assign_pair lhs:(LhsName name:prefix) op:Equal spids:[270])
                    (assign_pair lhs:(LhsName name:ri_path) op:Equal spids:[272])
                    (assign_pair
                      lhs: (LhsName name:ri_version)
                      op: Equal
                      spids: [274]
                    )
                    (assign_pair
                      lhs: (LhsName name:ri_major)
                      op: Equal
                      spids: [276]
                    )
                    (assign_pair
                      lhs: (LhsName name:separator)
                      op: Equal
                      spids: [278]
                    )
                    (assign_pair lhs:(LhsName name:IFS) op:Equal spids:[280])
                  ]
                  spids: [264]
                )
                (Assignment
                  keyword: Assign_Local
                  flags: [-a]
                  pairs: [(assign_pair lhs:(LhsName name:classes) op:Equal spids:[287])]
                  spids: [283]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:ri_path)
                      op: Equal
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: (CommandList children:[(C {(type)} {(-p)} {(ri)})])
                            left_token: <Left_CommandSub '$('>
                            spids: [292 298]
                          )
                        }
                      spids: [291]
                    )
                  ]
                  spids: [291]
                )
                (AndOr
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ri_version)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (SimpleCommand
                                          words: [{(ruby)} {(-W0)} {($ VSub_Name '$ri_path')} {(-v)}]
                                          redirects: [
                                            (Redir
                                              op_id: Redir_GreatAnd
                                              fd: 2
                                              arg_word: {(1)}
                                              spids: [324]
                                            )
                                          ]
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [315 326]
                                )
                              )
                            }
                          spids: [313]
                        )
                      ]
                      spids: [313]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ri_version)
                          op: Equal
                          rhs: {(integrated)}
                          spids: [331]
                        )
                      ]
                      spids: [331]
                    )
                  ]
                  op_id: Op_DPipe
                )
                (AndOr
                  children: [
                    (DBracket
                      expr: 
                        (BoolBinary
                          op_id: BoolBinary_GlobNEqual
                          left: {($ VSub_Name '$ri_version')}
                          right: 
                            {
                              (BracedVarSub
                                token: <VSub_Name ri_version>
                                suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{('200*')})
                                spids: [341 345]
                              )
                            }
                        )
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ri_version)
                          op: Equal
                          rhs: {(integrated)}
                          spids: [351]
                        )
                      ]
                      spids: [351]
                    )
                  ]
                  op_id: Op_DAmp
                )
                (AndOr
                  children: [
                    (DBracket
                      expr: 
                        (BoolBinary
                          op_id: BoolBinary_EqualTilde
                          left: {($ VSub_Name '$ri_version')}
                          right: 
                            {(ri) (Lit_Other '[') (Lit_Other '[') (Lit_Other ':') (space) 
                              (Lit_Other ':') (Lit_Other ']') (Lit_Other ']') (v) (Lit_Other '?') ('(') (Lit_Other '[') (0-9) (Lit_Other ']') 
                              (Lit_Other '+') (')')
                            }
                        )
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ri_major)
                          op: Equal
                          rhs: 
                            {
                              (BracedVarSub
                                token: <VSub_Name BASH_REMATCH>
                                bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 1)}))
                                spids: [383 388]
                              )
                            }
                          spids: [382]
                        )
                      ]
                      spids: [382]
                    )
                  ]
                  op_id: Op_DAmp
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:IFS)
                      op: Equal
                      rhs: {(SQ <', '> <Lit_EscapedChar '\\n'> <Lit_EscapedChar '\\t'>)}
                      spids: [396]
                    )
                  ]
                  spids: [396]
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {(DQ ($ VSub_Name '$cur'))}
                                  right: 
                                    {(Lit_Other '[') (A-Z) (Lit_Other ']') (Lit_Other '*') 
                                      (Lit_Other '[') (Lit_Pound '#') (.) (Lit_Other ']') (Lit_Other '*')
                                    }
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (AndOr
                          children: [
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {(DQ ($ VSub_Name '$cur'))}
                                  right: {(Lit_Other '*') (Lit_Pound '#') (Lit_Other '*')}
                                )
                            )
                            (AndOr
                              children: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:separator)
                                      op: Equal
                                      rhs: {(Lit_Pound '#')}
                                      spids: [446]
                                    )
                                  ]
                                  spids: [446]
                                )
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:separator)
                                      op: Equal
                                      rhs: {(.)}
                                      spids: [451]
                                    )
                                  ]
                                  spids: [451]
                                )
                              ]
                              op_id: Op_DPipe
                            )
                          ]
                          op_id: Op_DAmp
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:class)
                              op: Equal
                              rhs: 
                                {
                                  (BracedVarSub
                                    token: <VSub_Name cur>
                                    suffix_op: 
                                      (StringUnary
                                        op_id: VOp1_Percent
                                        arg_word: {($ VSub_Name '$separator') ('*')}
                                      )
                                    spids: [460 465]
                                  )
                                }
                              spids: [459]
                            )
                          ]
                          spids: [459]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:method)
                              op: Equal
                              rhs: 
                                {
                                  (BracedVarSub
                                    token: <VSub_Name cur>
                                    suffix_op: 
                                      (StringUnary
                                        op_id: VOp1_Pound
                                        arg_word: {('*') ($ VSub_Name '$separator')}
                                      )
                                    spids: [469 474]
                                  )
                                }
                              spids: [468]
                            )
                          ]
                          spids: [468]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:classes)
                              op: Equal
                              rhs: {(ArrayLiteralPart words:[{($ VSub_Name '$class')}])}
                              spids: [477]
                            )
                          ]
                          spids: [477]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:prefix)
                              op: Equal
                              rhs: {(DQ ('-P ') ($ VSub_Name '$class') ($ VSub_Name '$separator'))}
                              spids: [485]
                            )
                          ]
                          spids: [485]
                        )
                        (C {(_ri_get_methods)})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [16777215 427]
                    )
                  ]
                  spids: [16777215 501]
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {($ VSub_Name '$ri_version')}
                                  right: {(integrated)}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:classes)
                              op: Equal
                              rhs: 
                                {
                                  (ArrayLiteralPart
                                    words: [
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (Pipeline
                                                  children: [
                                                    (SimpleCommand
                                                      words: [{(ri)} {(-c)}]
                                                      redirects: [
                                                        (Redir
                                                          op_id: Redir_Great
                                                          fd: 2
                                                          arg_word: {(/dev/null)}
                                                          spids: [534]
                                                        )
                                                      ]
                                                    )
                                                    (SimpleCommand
                                                      words: [
                                                        {(ruby)}
                                                        {(-ne)}
                                                        {
                                                          (SQ <'if /^\\s*$/..$stdin.eof then \\\n'> 
                                                            <
'        if /, [A-Z]+/ then print; end; end'
                                                            >
                                                          )
                                                        }
                                                      ]
                                                      redirects: [
                                                        (Redir
                                                          op_id: Redir_Great
                                                          fd: 2
                                                          arg_word: {(/dev/null)}
                                                          spids: [548]
                                                        )
                                                      ]
                                                    )
                                                  ]
                                                  negated: False
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [528 551]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [525]
                            )
                          ]
                          spids: [525]
                        )
                      ]
                      spids: [16777215 518]
                    )
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (LogicalAnd
                                  left: (WordTest w:{($ VSub_Name '$ri_major')})
                                  right: 
                                    (BoolBinary
                                      op_id: BoolBinary_ge
                                      left: {($ VSub_Name '$ri_major')}
                                      right: {(3)}
                                    )
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:classes)
                              op: Equal
                              rhs: 
                                {
                                  (ArrayLiteralPart
                                    words: [
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (SimpleCommand
                                                  words: [{(ri)} {(-l)}]
                                                  redirects: [
                                                    (Redir
                                                      op_id: Redir_Great
                                                      fd: 2
                                                      arg_word: {(/dev/null)}
                                                      spids: [585]
                                                    )
                                                  ]
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [579 588]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [576]
                            )
                          ]
                          spids: [576]
                        )
                      ]
                      spids: [556 573]
                    )
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {($ VSub_Name '$ri_version')}
                                  right: {(DQ ('ri 1.8a'))}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:classes)
                              op: Equal
                              rhs: 
                                {
                                  (ArrayLiteralPart
                                    words: [
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (Pipeline
                                                  children: [
                                                    (C {(ruby)} {(-W0)} {($ VSub_Name '$ri_path')})
                                                    (C {(ruby)} {(-ne)} 
                                                      {(SQ <'if /^'>) (DQ ("'")) (SQ <ri>) (DQ ("'")) 
                                                        (SQ <' has/..$stdin.eof then \\\n'> 
                                                          <
'            if /^ .*[A-Z]/ then print; end; end'
                                                          >
                                                        )
                                                      }
                                                    )
                                                  ]
                                                  negated: False
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [614 647]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [611]
                            )
                          ]
                          spids: [611]
                        )
                      ]
                      spids: [593 608]
                    )
                  ]
                  else_action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:classes)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (Pipeline
                                              children: [
                                                (C {(ruby)} {(-W0)} {($ VSub_Name '$ri_path')})
                                                (C {(ruby)} {(-ne)} 
                                                  {
                                                    (SQ <'if /^I have/..$stdin.eof then \\\n'> 
                                                      <
'                if /^ .*[A-Z]/ then print; end; end'
                                                      >
                                                    )
                                                  }
                                                )
                                              ]
                                              negated: False
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [657 678]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [654]
                        )
                      ]
                      spids: [654]
                    )
                  ]
                  spids: [651 682]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:COMPREPLY)
                      op: Equal
                      rhs: 
                        {
                          (ArrayLiteralPart
                            words: [
                              {
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (C {(compgen)} {(-W)} {(SQ <'${classes[@]}'>)} {(--)} 
                                          {(DQ ($ VSub_Name '$cur'))}
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [689 705]
                                )
                              }
                            ]
                          )
                        }
                      spids: [686]
                    )
                  ]
                  spids: [686]
                )
                (C {(__ltrim_colon_completions)} {(DQ ($ VSub_Name '$cur'))})
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {(DQ ($ VSub_Name '$cur'))}
                                  right: {(Lit_Other '[') (A-Z) (Lit_Other ']') (Lit_Other '*')}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})]
                      spids: [16777215 736]
                    )
                  ]
                  spids: [16777215 748]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:method)
                      op: Equal
                      rhs: {($ VSub_Name '$cur')}
                      spids: [756]
                    )
                  ]
                  spids: [756]
                )
                (C {(_ri_get_methods)})
              ]
              spids: [238]
            )
          spids: [234 237]
        )
        (C {(complete)} {(-F)} {(_ri)} {(ri)})
      ]
      op_id: Op_DAmp
    )
  ]
)