(command.CommandList
  children: [
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <Id.Lit_LBracket '['>
          more_env: []
          words: [{<Id.Lit_LBracket '['>} {<-f>} {<'/etc/profile.d/modules.sh'>} {<Id.Lit_RBracket ']'>}]
          redirects: []
          do_fork: T
        )
        (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<1>})
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.ShFunction
      name_tok: <_module_list>
      name: _module_list
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'modules='> 
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Pipeline
                          children: [
                            (command.Simple
                              blame_tok: <sed>
                              more_env: []
                              words: [{<sed>} {(SQ <'s/:/ /g'>)}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_TLess '<<<'>
                                  loc: (redir_loc.Fd fd:0)
                                  arg: {($ Id.VSub_DollarName LOADEDMODULES)}
                                )
                              ]
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <sort>
                              more_env: []
                              words: [{<sort>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_Pipe _>]
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <compgen>
              more_env: []
              words: [
                {<compgen>}
                {<-W>}
                {(DQ ($ Id.VSub_DollarName modules))}
                {<-->}
                {($ Id.VSub_Number 1)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <_module_path>
      name: _module_path
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'modules='> 
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Pipeline
                          children: [
                            (command.Simple
                              blame_tok: <sed>
                              more_env: []
                              words: [{<sed>} {(SQ <'s/:/ /g'>)}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_TLess '<<<'>
                                  loc: (redir_loc.Fd fd:0)
                                  arg: {($ Id.VSub_DollarName MODULEPATH)}
                                )
                              ]
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <sort>
                              more_env: []
                              words: [{<sort>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_Pipe _>]
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <compgen>
              more_env: []
              words: [
                {<compgen>}
                {<-W>}
                {(DQ ($ Id.VSub_DollarName modules))}
                {<-->}
                {($ Id.VSub_Number 1)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <_module_avail>
      name: _module_avail
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'modules='> 
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Pipeline
                          children: [
                            (command.Simple
                              blame_tok: <module>
                              more_env: []
                              words: [{<module>} {<avail>}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_GreatAnd '2>&'>
                                  loc: (redir_loc.Fd fd:2)
                                  arg: {<1>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <command>
                              more_env: []
                              words: [{<command>} {<grep>} {<-E>} {<-v>} {(SQ <'^(-|$)'>)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <xargs>
                              more_env: []
                              words: [{<xargs>} {<printf>} {(SQ <'%s\\n'>)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <sed>
                              more_env: []
                              words: [{<sed>} {<-e>} {(SQ <'s/(default)//g'>)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <sort>
                              more_env: []
                              words: [{<sort>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>]
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <compgen>
              more_env: []
              words: [
                {<compgen>}
                {<-W>}
                {(DQ ($ Id.VSub_DollarName modules))}
                {<-->}
                {($ Id.VSub_Number 1)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.AndOr
      children: [
        (command.ShFunction
          name_tok: <_module>
          name: _module
          body: 
            (BraceGroup
              left: <Id.Lit_LBrace '{'>
              children: [
                (command.Simple
                  blame_tok: <local>
                  more_env: []
                  words: [{<local>} {<cur>} {<prev>} {<words>} {<cword>}]
                  redirects: []
                  do_fork: T
                )
                (command.AndOr
                  children: [
                    (command.Simple
                      blame_tok: <_init_completion>
                      more_env: []
                      words: [{<_init_completion>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ControlFlow keyword:<Id.ControlFlow_Return return>)
                  ]
                  ops: [<Id.Op_DPipe _>]
                )
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  left: <Id.KW_DLeftBracket '[['>
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_DollarName cword)}
                                      right: {<1>}
                                    )
                                  right: <Id.Lit_DRightBracket ']]'>
                                  redirects: []
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.Simple
                          blame_tok: <local>
                          more_env: []
                          words: [{<local>} {<options>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'options='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'options='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'options='> name:options)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (command.Simple
                                              blame_tok: <module>
                                              more_env: []
                                              words: [{<module>} {<help>}]
                                              redirects: [
                                                (Redir
                                                  op: <Id.Redir_GreatAnd '2>&'>
                                                  loc: (redir_loc.Fd fd:2)
                                                  arg: {<1>}
                                                )
                                              ]
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <command>
                                              more_env: []
                                              words: [
                                                {<command>}
                                                {<grep>}
                                                {<-E>}
                                                {(SQ <'^[[:space:]]*\\+'>)}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <awk>
                                              more_env: []
                                              words: [{<awk>} {(SQ <'{print $2}'>)}]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <sed>
                                              more_env: []
                                              words: [{<sed>} {<-e>} {(SQ <'s/|/ /g'>)}]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <sort>
                                              more_env: []
                                              words: [{<sort>}]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          ops: [
                                            <Id.Op_Pipe _>
                                            <Id.Op_Pipe _>
                                            <Id.Op_Pipe _>
                                            <Id.Op_Pipe _>
                                          ]
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'COMPREPLY='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'COMPREPLY='>
                              lhs: 
                                (sh_lhs_expr.Name
                                  left: <Id.Lit_VarLike 'COMPREPLY='>
                                  name: COMPREPLY
                                )
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (ShArrayLiteral
                                    left: <Id.Op_LParen _>
                                    words: [
                                      {
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              blame_tok: <compgen>
                                              more_env: []
                                              words: [
                                                {<compgen>}
                                                {<-W>}
                                                {(DQ ($ Id.VSub_DollarName options))}
                                                {<-->}
                                                {(DQ ($ Id.VSub_DollarName cur))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      }
                                    ]
                                    right: <Id.Right_ShArrayLiteral _>
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                      ]
                      spids: [283 296]
                    )
                    (IfArm
                      keyword: <Id.KW_Elif elif>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  left: <Id.KW_DLeftBracket '[['>
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_DollarName cword)}
                                      right: {<2>}
                                    )
                                  right: <Id.Lit_DRightBracket ']]'>
                                  redirects: []
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.Case
                          case_kw: <Id.KW_Case case>
                          to_match: (case_arg.Word w:{($ Id.VSub_DollarName prev)})
                          arms_start: <Id.KW_In in>
                          arms: [
                            (CaseArm
                              left: <add>
                              pattern: 
                                (pat.Words
                                  words: [{<add>} {<display>} {<help>} {<load>} {<show>} {<whatis>}]
                                )
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'COMPREPLY='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'COMPREPLY='>
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'COMPREPLY='>
                                          name: COMPREPLY
                                        )
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (ShArrayLiteral
                                            left: <Id.Op_LParen _>
                                            words: [
                                              {
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <_module_avail>
                                                      more_env: []
                                                      words: [
                                                        {<_module_avail>}
                                                        {(DQ ($ Id.VSub_DollarName cur))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                )
                                              }
                                            ]
                                            right: <Id.Right_ShArrayLiteral _>
                                          )
                                        }
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                            (CaseArm
                              left: <rm>
                              pattern: 
                                (pat.Words
                                  words: [{<rm>} {<switch>} {<swap>} {<unload>} {<update>}]
                                )
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'COMPREPLY='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'COMPREPLY='>
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'COMPREPLY='>
                                          name: COMPREPLY
                                        )
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (ShArrayLiteral
                                            left: <Id.Op_LParen _>
                                            words: [
                                              {
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <_module_list>
                                                      more_env: []
                                                      words: [
                                                        {<_module_list>}
                                                        {(DQ ($ Id.VSub_DollarName cur))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                )
                                              }
                                            ]
                                            right: <Id.Right_ShArrayLiteral _>
                                          )
                                        }
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                            (CaseArm
                              left: <unuse>
                              pattern: (pat.Words words:[{<unuse>}])
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'COMPREPLY='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'COMPREPLY='>
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'COMPREPLY='>
                                          name: COMPREPLY
                                        )
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (ShArrayLiteral
                                            left: <Id.Op_LParen _>
                                            words: [
                                              {
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <_module_path>
                                                      more_env: []
                                                      words: [
                                                        {<_module_path>}
                                                        {(DQ ($ Id.VSub_DollarName cur))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                )
                                              }
                                            ]
                                            right: <Id.Right_ShArrayLiteral _>
                                          )
                                        }
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                          ]
                          arms_end: <Id.KW_Esac esac>
                          redirects: []
                        )
                      ]
                      spids: [384 397]
                    )
                    (IfArm
                      keyword: <Id.KW_Elif elif>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  left: <Id.KW_DLeftBracket '[['>
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_DollarName cword)}
                                      right: {<3>}
                                    )
                                  right: <Id.Lit_DRightBracket ']]'>
                                  redirects: []
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.Case
                          case_kw: <Id.KW_Case case>
                          to_match: 
                            (case_arg.Word
                              w: 
                                {
                                  (BracedVarSub
                                    left: <Id.Left_DollarBrace '${'>
                                    token: <Id.VSub_Name words>
                                    var_name: words
                                    bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>})
                                    right: <Id.Right_DollarBrace '}'>
                                  )
                                }
                            )
                          arms_start: <Id.KW_In in>
                          arms: [
                            (CaseArm
                              left: <swap>
                              pattern: (pat.Words words:[{<swap>} {<switch>}])
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'COMPREPLY='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'COMPREPLY='>
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'COMPREPLY='>
                                          name: COMPREPLY
                                        )
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (ShArrayLiteral
                                            left: <Id.Op_LParen _>
                                            words: [
                                              {
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <_module_avail>
                                                      more_env: []
                                                      words: [
                                                        {<_module_avail>}
                                                        {(DQ ($ Id.VSub_DollarName cur))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                )
                                              }
                                            ]
                                            right: <Id.Right_ShArrayLiteral _>
                                          )
                                        }
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                          ]
                          arms_end: <Id.KW_Esac esac>
                          redirects: []
                        )
                      ]
                      spids: [491 504]
                    )
                  ]
                  else_action: []
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
                (command.ControlFlow
                  keyword: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
              redirects: []
              right: <Id.Lit_RBrace '}'>
            )
        )
        (command.Simple
          blame_tok: <complete>
          more_env: []
          words: [{<complete>} {<-F>} {<_module>} {<-o>} {<default>} {<module>}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
  ]
)