(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _minicom
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(cur)} {(prev)} {(words)} {(cword)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Return val:return span_id:26)
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [{(-a)} {(-c)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:44)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:46)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {(SQ (Token id:Id.Lit_Chars val:'on off' span_id:53))} {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [43]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:67)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [37 40 72 -1]
                )
                (case_arm
                  pat_list: [{(-S)} {(-C)}]
                  action: [
                    (C {(_filedir)})
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:84)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [75 78 89 -1]
                )
                (case_arm
                  pat_list: [{(-P)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:97)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:99)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(printf)} 
                                              {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:104))} {(/dev/tty) (Id.Lit_Star '*')}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [96]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:116)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:118)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}'
                                                    span_id: 125
                                                  )
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [115]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:141)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [92 93 146 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {(DQ ($ Id.VSub_DollarName '$cur'))}
                              right: {(-) (Id.Lit_Other '*')}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:168)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:174)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:176)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'-s -o -m -M -z -l -L -w -a -t -c -S -d -p -C\n'
                                                    span_id: 183
                                                  ) (Token id:Id.Lit_Chars val:'            -T -7 -8' span_id:184)
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [173]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:198)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [154 170]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:COMPREPLY)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (sh_array_literal
                            left: (Token id:Id.Op_LParen val:'(' span_id:207)
                            words: [
                              {
                                (command_sub
                                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:210)
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (command.Pipeline
                                          children: [
                                            (command.Simple
                                              words: [
                                                {(command)}
                                                {(ls)}
                                                {(/etc/minirc.) (Id.Lit_Star '*')}
                                                {(/etc/minicom/minirc.) (Id.Lit_Star '*')}
                                                {
                                                  (word_part.TildeSub
                                                    token: 
                                                      (Token
                                                        id: Id.Lit_TildeLike
                                                        val: '~'
                                                        span_id: 222
                                                      )
                                                  ) (/.minirc.) (Id.Lit_Star '*')
                                                }
                                              ]
                                              redirects: [
                                                (redir.Redir
                                                  op: (Token id:Id.Redir_Great val:'2>' span_id:228)
                                                  fd: 2
                                                  arg_word: {(/dev/null)}
                                                )
                                              ]
                                            )
                                            (C {(sed)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 's|^.*minirc\\.||'
                                                    span_id: 236
                                                  )
                                                )
                                              }
                                            )
                                            (C {(grep)} {(DQ ('^') (${ Id.VSub_Name cur))})
                                          ]
                                          negated: F
                                        )
                                      ]
                                    )
                                )
                              }
                            ]
                          )
                        }
                      spids: [206]
                    )
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (command.DBracket
                      expr: (bool_expr.WordTest w:{($ Id.VSub_DollarName '$COMPREPLY')})
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:265)
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (C {(complete)} {(-F)} {(_minicom)} {(-o)} {(default)} {(minicom)})
  ]
)