(command.CommandList
  children: [
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(Lit_Other '[')} {(-f)} {(/etc/profile.d/modules.sh)} {(Lit_Other ']')})
        (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
      ]
    )
    (command.FuncDef
      name: _module_list
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:modules spids:[86])
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSubPart
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (command.SimpleCommand
                                      words: [{(sed)} {(SQ <'s/:/ /g'>)}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_TLess '<<<'>
                                          fd: 16777215
                                          arg_word: {($ VSub_DollarName '$LOADEDMODULES')}
                                        )
                                      ]
                                    )
                                    (C {(sort)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [88 103]
                        )
                      )
                    }
                  spids: [86]
                )
              ]
              spids: [84]
            )
            (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$modules'))} {(--)} {($ VSub_Number '$1')})
          ]
          spids: [81]
        )
      spids: [76 80]
    )
    (command.FuncDef
      name: _module_path
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:modules spids:[132])
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSubPart
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (command.SimpleCommand
                                      words: [{(sed)} {(SQ <'s/:/ /g'>)}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_TLess '<<<'>
                                          fd: 16777215
                                          arg_word: {($ VSub_DollarName '$MODULEPATH')}
                                        )
                                      ]
                                    )
                                    (C {(sort)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [134 149]
                        )
                      )
                    }
                  spids: [132]
                )
              ]
              spids: [130]
            )
            (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$modules'))} {(--)} {($ VSub_Number '$1')})
          ]
          spids: [127]
        )
      spids: [122 126]
    )
    (command.FuncDef
      name: _module_avail
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:modules spids:[178])
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSubPart
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (command.SimpleCommand
                                      words: [{(module)} {(avail)}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_GreatAnd '2>&'>
                                          fd: 2
                                          arg_word: {(1)}
                                        )
                                      ]
                                    )
                                    (C {(command)} {(grep)} {(-E)} {(-v)} {(SQ <'^(-|$)'>)})
                                    (C {(xargs)} {(printf)} {(SQ <'%s\\n'>)})
                                    (C {(sed)} {(-e)} {(SQ <'s/(default)//g'>)})
                                    (C {(sort)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [180 233]
                        )
                      )
                    }
                  spids: [178]
                )
              ]
              spids: [176]
            )
            (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$modules'))} {(--)} {($ VSub_Number '$1')})
          ]
          spids: [173]
        )
      spids: [168 172]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.FuncDef
          name: _module
          body: 
            (command.BraceGroup
              children: [
                (command.Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:cur spids:[266])
                      op: Equal
                      spids: [266]
                    )
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:prev spids:[268])
                      op: Equal
                      spids: [268]
                    )
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:words spids:[270])
                      op: Equal
                      spids: [270]
                    )
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:cword spids:[272])
                      op: Equal
                      spids: [272]
                    )
                  ]
                  spids: [264]
                )
                (command.AndOr
                  ops: [Op_DPipe]
                  children: [
                    (C {(_init_completion)})
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.BoolBinary
                                  op_id: BoolBinary_eq
                                  left: {($ VSub_DollarName '$cword')}
                                  right: {(1)}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (command.Assignment
                          keyword: Assign_Local
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:options spids:[306])
                              op: Equal
                              spids: [306]
                            )
                          ]
                          spids: [304]
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:options spids:[309])
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Pipeline
                                              children: [
                                                (command.SimpleCommand
                                                  words: [{(module)} {(help)}]
                                                  redirects: [
                                                    (redir.Redir
                                                      op: <Redir_GreatAnd '2>&'>
                                                      fd: 2
                                                      arg_word: {(1)}
                                                    )
                                                  ]
                                                )
                                                (C {(command)} {(grep)} {(-E)} {(SQ <'^[[:space:]]*\\+'>)})
                                                (C {(awk)} {(SQ <'{print $2}'>)})
                                                (C {(sed)} {(-e)} {(SQ <'s/|/ /g'>)})
                                                (C {(sort)})
                                              ]
                                              negated: F
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [311 356]
                                    )
                                  )
                                }
                              spids: [309]
                            )
                          ]
                          spids: [309]
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:COMPREPLY spids:[361])
                              op: Equal
                              rhs: 
                                {
                                  (word_part.ArrayLiteralPart
                                    words: [
                                      {
                                        (word_part.CommandSubPart
                                          command_list: 
                                            (command.CommandList
                                              children: [
                                                (C {(compgen)} {(-W)} 
                                                  {(DQ ($ VSub_DollarName '$options'))} {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [364 378]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [361]
                            )
                          ]
                          spids: [361]
                        )
                      ]
                      spids: [16777215 296]
                    )
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.BoolBinary
                                  op_id: BoolBinary_eq
                                  left: {($ VSub_DollarName '$cword')}
                                  right: {(2)}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(add)} {(display)} {(help)} {(load)} {(show)} {(whatis)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY spids:[421])
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(_module_avail)} 
                                                          {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [424 430]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [421]
                                    )
                                  ]
                                  spids: [421]
                                )
                              ]
                              spids: [407 418 435 16777215]
                            )
                            (case_arm
                              pat_list: [{(rm)} {(switch)} {(swap)} {(unload)} {(update)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY spids:[450])
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(_module_list)} 
                                                          {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [453 459]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [450]
                                    )
                                  ]
                                  spids: [450]
                                )
                              ]
                              spids: [438 447 464 16777215]
                            )
                            (case_arm
                              pat_list: [{(unuse)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY spids:[471])
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(_module_path)} 
                                                          {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [474 480]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [471]
                                    )
                                  ]
                                  spids: [471]
                                )
                              ]
                              spids: [467 468 485 16777215]
                            )
                          ]
                          spids: [400 404 488]
                        )
                      ]
                      spids: [384 397]
                    )
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.BoolBinary
                                  op_id: BoolBinary_eq
                                  left: {($ VSub_DollarName '$cword')}
                                  right: {(3)}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (command.Case
                          to_match: 
                            {
                              (word_part.BracedVarSub
                                token: <VSub_Name words>
                                bracket_op: 
                                  (bracket_op.ArrayIndex
                                    expr: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [509 514]
                              )
                            }
                          arms: [
                            (case_arm
                              pat_list: [{(swap)} {(switch)}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:COMPREPLY spids:[525])
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.ArrayLiteralPart
                                            words: [
                                              {
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(_module_avail)} 
                                                          {(DQ ($ VSub_DollarName '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [528 534]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [525]
                                    )
                                  ]
                                  spids: [525]
                                )
                              ]
                              spids: [519 522 539 16777215]
                            )
                          ]
                          spids: [507 516 542]
                        )
                      ]
                      spids: [491 504]
                    )
                  ]
                  spids: [16777215 545]
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
              spids: [261]
            )
          spids: [256 260]
        )
        (C {(complete)} {(-F)} {(_module)} {(-o)} {(default)} {(module)})
      ]
    )
  ]
)