(command.CommandList
  children: [
    (command.ShFunction
      name: _ri_get_methods
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<regex>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName '$ri_version')}
                                  right: {<integrated>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Unary
                                          op_id: Id.BoolUnary_z
                                          child: {($ Id.VSub_DollarName '$separator')}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:regex)
                                  op: assign_op.Equal
                                  rhs: {(DQ <'(Instance|Class)'>)}
                                  spids: [50]
                                )
                              ]
                            )
                          ]
                          spids: [36 47]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: {($ Id.VSub_DollarName '$separator')}
                                          right: {(DQ <'#'>)}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:regex)
                                  op: assign_op.Equal
                                  rhs: {<Instance>}
                                  spids: [74]
                                )
                              ]
                            )
                          ]
                          spids: [56 71]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:regex)
                              op: assign_op.Equal
                              rhs: {<Class>}
                              spids: [81]
                            )
                          ]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.PlusEqual
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (command.Pipeline
                                            children: [
                                              (command.Simple
                                                words: [
                                                  {<ri>}
                                                  {
                                                    (braced_var_sub
                                                      token: <Id.VSub_Name classes>
                                                      bracket_op: 
                                                        (bracket_op.WholeArray
                                                          op_id: Id.Lit_At
                                                        )
                                                    )
                                                  }
                                                ]
                                                redirects: [
                                                  (redir
                                                    op: <Id.Redir_Great '2>'>
                                                    loc: (redir_loc.Fd fd:2)
                                                    arg: {<'/dev/null'>}
                                                  )
                                                ]
                                                do_fork: T
                                              )
                                              (command.Simple
                                                words: [
                                                  {<ruby>}
                                                  {<-ane>}
                                                  {(SQ <'if /^'>) (DQ ($ Id.VSub_DollarName '$regex')) 
                                                    (SQ 
                                                      <
' methods:/.../^------------------|^$/ and \\\n'
                                                      > <'            /^ / then print $_.split(/, |,$/).grep(/^[^\\[]*$/).join("\\n"); \\\n'> 
                                                      <'            end'>
                                                    )
                                                  }
                                                ]
                                                redirects: [
                                                  (redir
                                                    op: <Id.Redir_Great '2>'>
                                                    loc: (redir_loc.Fd fd:2)
                                                    arg: {<'/dev/null'>}
                                                  )
                                                ]
                                                do_fork: T
                                              )
                                              (C {<sort>} {<-u>})
                                            ]
                                            negated: F
                                          )
                                      )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [89]
                        )
                      ]
                    )
                  ]
                  spids: [20 33]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:COMPREPLY)
                      op: assign_op.PlusEqual
                      rhs: 
                        {
                          (sh_array_literal
                            left: <Id.Op_LParen _>
                            words: [
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (command.Pipeline
                                        children: [
                                          (C {<ruby>} {<-W0>} {($ Id.VSub_DollarName '$ri_path')} 
                                            {
                                              (braced_var_sub
                                                token: <Id.VSub_Name classes>
                                                bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                              )
                                            }
                                          )
                                          (C {<ruby>} {<-ane>} 
                                            {
                                              (SQ 
                                                <
'if /^-/.../^-/ and ! /^-/ and ! /^ +(class|module): / then \\\n'
                                                > <'            print $_.split(/, |,$| +/).grep(/^[^\\[]*$/).join("\\n"); \\\n'> <'            end'>
                                              )
                                            }
                                          )
                                          (C {<sort>} {<-u>})
                                        ]
                                        negated: F
                                      )
                                  )
                                )
                              }
                            ]
                          )
                        }
                      spids: [155]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:COMPREPLY)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              child: 
                                (C {<compgen>} {($ Id.VSub_DollarName '$prefix')} {<-W>} 
                                  {(SQ <'${COMPREPLY[@]}'>)} {<-->} {($ Id.VSub_DollarName '$method')}
                                )
                            )
                          }
                        ]
                      )
                    }
                  spids: [205]
                )
              ]
            )
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.ShFunction
          name: _ri
          body: 
            (BraceGroup
              children: [
                (C {<local>} {<cur>} {<prev>} {<words>} {<cword>})
                (command.AndOr
                  ops: [Id.Op_DPipe]
                  children: [
                    (C {<_init_completion>} {<-n>} {<Id.Lit_Colon ':'>})
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                )
                (C {<local>} {<Id.KW_Class class>} {<method>} {<prefix>} {<ri_path>} {<ri_version>} 
                  {<ri_major>} {<separator>} {<IFS>}
                )
                (C {<local>} {<-a>} {<classes>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:ri_path)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            child: (C {<type>} {<-p>} {<ri>})
                          )
                        }
                      spids: [291]
                    )
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DPipe]
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ri_version)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Simple
                                      words: [{<ruby>} {<-W0>} {($ Id.VSub_DollarName '$ri_path')} {<-v>}]
                                      redirects: [
                                        (redir
                                          op: <Id.Redir_GreatAnd '2>&'>
                                          loc: (redir_loc.Fd fd:2)
                                          arg: {<1>}
                                        )
                                      ]
                                      do_fork: T
                                    )
                                )
                              )
                            }
                          spids: [313]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ri_version)
                          op: assign_op.Equal
                          rhs: {<integrated>}
                          spids: [331]
                        )
                      ]
                    )
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobNEqual
                          left: {($ Id.VSub_DollarName '$ri_version')}
                          right: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name ri_version>
                                suffix_op: 
                                  (suffix_op.Unary
                                    tok: <Id.VOp1_Percent '%'>
                                    arg_word: {<200> <Id.Lit_Other '*'>}
                                  )
                              )
                            }
                        )
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ri_version)
                          op: assign_op.Equal
                          rhs: {<integrated>}
                          spids: [352]
                        )
                      ]
                    )
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_EqualTilde
                          left: {($ Id.VSub_DollarName '$ri_version')}
                          right: 
                            {<ri> <Id.Lit_Other '['> <Id.Lit_Other '['> <Id.Lit_Other ':'> <space> 
                              <Id.Lit_Other ':'> <Id.Lit_Other ']'> <Id.Lit_Other ']'> <v> <Id.Lit_Other '?'> <Id.Lit_Other '('> <Id.Lit_Other '['> <0-9> 
                              <Id.Lit_Other ']'> <Id.Lit_Other '+'> <Id.Lit_Other ')'>
                            }
                        )
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ri_major)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name BASH_REMATCH>
                                bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>})
                              )
                            }
                          spids: [383]
                        )
                      ]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:IFS)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (single_quoted
                            left: <Id.Left_DollarSingleQuote '$\''>
                            tokens: [
                              <Id.Char_Literals ', '>
                              <Id.Char_OneChar '\\n'>
                              <Id.Char_OneChar '\\t'>
                            ]
                            multiline: F
                          )
                        }
                      spids: [397]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {(DQ ($ Id.VSub_DollarName '$cur'))}
                                      right: 
                                        {<Id.Lit_Other '['> <A-Z> <Id.Lit_Other ']'> <Id.Lit_Other '*'> 
                                          <Id.Lit_Other '['> <Id.Lit_Pound '#'> <.> <Id.Lit_Other ']'> <Id.Lit_Other '*'>
                                        }
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DPipe]
                          children: [
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ ($ Id.VSub_DollarName '$cur'))}
                                  right: {<Id.Lit_Other '*'> <Id.Lit_Pound '#'> <Id.Lit_Other '*'>}
                                )
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:separator)
                                  op: assign_op.Equal
                                  rhs: {<Id.Lit_Pound '#'>}
                                  spids: [447]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:separator)
                                  op: assign_op.Equal
                                  rhs: {<.>}
                                  spids: [452]
                                )
                              ]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:class)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <Id.VSub_Name cur>
                                    suffix_op: 
                                      (suffix_op.Unary
                                        tok: <Id.VOp1_Percent '%'>
                                        arg_word: 
                                          {($ Id.VSub_DollarName '$separator') <Id.Lit_Other '*'>}
                                      )
                                  )
                                }
                              spids: [460]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:method)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <Id.VSub_Name cur>
                                    suffix_op: 
                                      (suffix_op.Unary
                                        tok: <Id.VOp1_Pound '#'>
                                        arg_word: 
                                          {<Id.Lit_Other '*'> ($ Id.VSub_DollarName '$separator')}
                                      )
                                  )
                                }
                              spids: [469]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:classes)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (sh_array_literal
                                    left: <Id.Op_LParen _>
                                    words: [{($ Id.VSub_DollarName '$class')}]
                                  )
                                }
                              spids: [478]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:prefix)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ <'-P '> ($ Id.VSub_DollarName '$class') 
                                    ($ Id.VSub_DollarName '$separator')
                                  )
                                }
                              spids: [486]
                            )
                          ]
                        )
                        (C {<_ri_get_methods>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [405 428]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {($ Id.VSub_DollarName '$ri_version')}
                                      right: {<integrated>}
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:classes)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (sh_array_literal
                                    left: <Id.Op_LParen _>
                                    words: [
                                      {
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Pipeline
                                              children: [
                                                (command.Simple
                                                  words: [{<ri>} {<-c>}]
                                                  redirects: [
                                                    (redir
                                                      op: <Id.Redir_Great '2>'>
                                                      loc: (redir_loc.Fd fd:2)
                                                      arg: {<'/dev/null'>}
                                                    )
                                                  ]
                                                  do_fork: T
                                                )
                                                (command.Simple
                                                  words: [
                                                    {<ruby>}
                                                    {<-ne>}
                                                    {
                                                      (SQ <'if /^\\s*$/..$stdin.eof then \\\n'> 
                                                        <
'        if /, [A-Z]+/ then print; end; end'
                                                        >
                                                      )
                                                    }
                                                  ]
                                                  redirects: [
                                                    (redir
                                                      op: <Id.Redir_Great '2>'>
                                                      loc: (redir_loc.Fd fd:2)
                                                      arg: {<'/dev/null'>}
                                                    )
                                                  ]
                                                  do_fork: T
                                                )
                                              ]
                                              negated: F
                                            )
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [526]
                            )
                          ]
                        )
                      ]
                      spids: [506 519]
                    )
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.LogicalAnd
                                      left: (bool_expr.WordTest w:{($ Id.VSub_DollarName '$ri_major')})
                                      right: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_ge
                                          left: {($ Id.VSub_DollarName '$ri_major')}
                                          right: {<3>}
                                        )
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:classes)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (sh_array_literal
                                    left: <Id.Op_LParen _>
                                    words: [
                                      {
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              words: [{<ri>} {<-l>}]
                                              redirects: [
                                                (redir
                                                  op: <Id.Redir_Great '2>'>
                                                  loc: (redir_loc.Fd fd:2)
                                                  arg: {<'/dev/null'>}
                                                )
                                              ]
                                              do_fork: T
                                            )
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [577]
                            )
                          ]
                        )
                      ]
                      spids: [557 574]
                    )
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {($ Id.VSub_DollarName '$ri_version')}
                                      right: {(DQ <'ri 1.8a'>)}
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:classes)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (sh_array_literal
                                    left: <Id.Op_LParen _>
                                    words: [
                                      {
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Pipeline
                                              children: [
                                                (C {<ruby>} {<-W0>} {($ Id.VSub_DollarName '$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: F
                                            )
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [612]
                            )
                          ]
                        )
                      ]
                      spids: [594 609]
                    )
                  ]
                  else_action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:classes)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<ruby>} {<-W0>} {($ Id.VSub_DollarName '$ri_path')})
                                            (C {<ruby>} {<-ne>} 
                                              {
                                                (SQ <'if /^I have/..$stdin.eof then \\\n'> 
                                                  <
'                if /^ .*[A-Z]/ then print; end; end'
                                                  >
                                                )
                                              }
                                            )
                                          ]
                                          negated: F
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [655]
                        )
                      ]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:COMPREPLY)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (sh_array_literal
                            left: <Id.Op_LParen _>
                            words: [
                              {
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (C {<compgen>} {<-W>} {(SQ <'${classes[@]}'>)} {<-->} 
                                      {(DQ ($ Id.VSub_DollarName '$cur'))}
                                    )
                                )
                              }
                            ]
                          )
                        }
                      spids: [687]
                    )
                  ]
                )
                (C {<__ltrim_colon_completions>} {(DQ ($ Id.VSub_DollarName '$cur'))})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {(DQ ($ Id.VSub_DollarName '$cur'))}
                                      right: 
                                        {<Id.Lit_Other '['> <A-Z> <Id.Lit_Other ']'> <Id.Lit_Other '*'>}
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [719 737]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:method)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_DollarName '$cur')}
                      spids: [757]
                    )
                  ]
                )
                (C {<_ri_get_methods>})
              ]
            )
        )
        (C {<complete>} {<-F>} {<_ri>} {<ri>})
      ]
    )
  ]
)