(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:GREP_OPTIONS)
          op: assign_op.Equal
          rhs: {(DQ <'--color=never'>)}
          spids: [9]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:GREP_COLORS)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [17]
        )
      ]
    )
    (command.ShFunction
      name: asdf_version
      body: 
        (BraceGroup
          children: [
            (C {<cat>} 
              {
                (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                  <'/VERSION'>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: asdf_dir
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$ASDF_DIR'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<local>} 
                      {<Id.Lit_VarLike 'current_script_path='> 
                        (braced_var_sub
                          token: <Id.VSub_Name BASH_SOURCE>
                          bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                        )
                      }
                    )
                    (C {<export>} {<ASDF_DIR>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ASDF_DIR)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.CommandList
                                    children: [
                                      (command.Sentence
                                        child: 
                                          (command.AndOr
                                            ops: [Id.Op_DPipe]
                                            children: [
                                              (C {<cd>} 
                                                {
                                                  (DQ 
                                                    (command_sub
                                                      left_token: <Id.Left_DollarParen '$('>
                                                      child: 
                                                        (C {<dirname>} 
                                                          {
                                                            (DQ 
                                                              (command_sub
                                                                left_token: 
                                                                  <Id.Left_DollarParen '$('>
                                                                child: 
                                                                  (C {<dirname>} 
                                                                    {
                                                                      (DQ 
                                                                        ($ Id.VSub_DollarName 
'$current_script_path'
                                                                        )
                                                                      )
                                                                    }
                                                                  )
                                                              )
                                                            )
                                                          }
                                                        )
                                                    )
                                                  )
                                                }
                                              )
                                              (command.ControlFlow
                                                token: <Id.ControlFlow_Exit exit>
                                              )
                                            ]
                                          )
                                        terminator: <Id.Op_Semi _>
                                      )
                                      (C {<pwd>})
                                    ]
                                  )
                              )
                            }
                          spids: [78]
                        )
                      ]
                    )
                  ]
                  spids: [46 59]
                )
              ]
            )
            (C {<echo>} {(DQ ($ Id.VSub_DollarName '$ASDF_DIR'))})
          ]
        )
    )
    (command.ShFunction
      name: asdf_repository_url
      body: 
        (BraceGroup
          children: [(C {<echo>} {(DQ <'https://github.com/asdf-vm/asdf-plugins.git'>)})]
        )
    )
    (command.ShFunction
      name: get_install_path
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'install_type='> ($ Id.VSub_Number '$2')})
            (C {<local>} {<Id.Lit_VarLike 'version='> ($ Id.VSub_Number '$3')})
            (C {<mkdir>} {<-p>} 
              {
                (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                  <'/installs/'> (${ Id.VSub_Name plugin)
                )
              }
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$install_type'))} 
                          {<Id.Lit_Equals '='>} {(DQ <version>)} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                          <'/installs/'> (${ Id.VSub_Name plugin) <'/'> (${ Id.VSub_Name version)
                        )
                      }
                    )
                  ]
                  spids: [177 194]
                )
              ]
              else_action: [
                (C {<echo>} 
                  {
                    (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                      <'/installs/'> (${ Id.VSub_Name plugin) <'/'> (${ Id.VSub_Name install_type) <-> (${ Id.VSub_Name version)
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: list_installed_versions
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<plugin_path>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:plugin_path)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<get_plugin_path>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))})
                      )
                    }
                  spids: [261]
                )
              ]
            )
            (C {<local>} {<plugin_installs_path>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:plugin_installs_path)
                  op: assign_op.Equal
                  rhs: 
                    {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                      <'/installs/'> (${ Id.VSub_Name plugin_name)
                    }
                  spids: [277]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-d>} 
                              {(DQ ($ Id.VSub_DollarName '$plugin_installs_path'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ForEach
                      iter_name: install
                      iter_words: [
                        {
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                words: [
                                  {<ls>}
                                  {<-d>}
                                  {(DQ (${ Id.VSub_Name plugin_installs_path)) <'/'> <Id.Lit_Star '*'> 
                                    <'/'>
                                  }
                                ]
                                redirects: [
                                  (redir
                                    op: <Id.Redir_Great '2>'>
                                    loc: (redir_loc.Fd fd:2)
                                    arg: {<'/dev/null'>}
                                  )
                                ]
                                do_fork: T
                              )
                          )
                        }
                      ]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [(C {<basename>} {(DQ ($ Id.VSub_DollarName '$install'))})]
                        )
                    )
                  ]
                  spids: [288 301]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_if_plugin_exists
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 1))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<display_error>} {(DQ <'No plugin given'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [362 377]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: (C {<asdf_dir>})
                                  ) <'/plugins/'> ($ Id.VSub_Number '$1')
                                )
                              } {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<display_error>} {(DQ <'No such plugin'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [396 415]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_if_version_exists
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'version='> ($ Id.VSub_Number '$2')})
            (C {<check_if_plugin_exists>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))})
            (C {<local>} {<install_path>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:install_path)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<find_install_path>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))} 
                            {(DQ ($ Id.VSub_DollarName '$version'))}
                          )
                      )
                    }
                  spids: [468]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$version'))} 
                                  {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <system>)} {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} 
                                  {(DQ ($ Id.VSub_DollarName '$install_path'))} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<display_error>} 
                      {
                        (DQ <'version '> ($ Id.VSub_DollarName '$version') <' is not installed for '> 
                          ($ Id.VSub_DollarName '$plugin_name')
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [483 515]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: get_plugin_path
      body: 
        (BraceGroup
          children: [
            (C {<echo>} 
              {
                (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                  <'/plugins/'> ($ Id.VSub_Number '$1')
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: display_error
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<echo>} {(DQ ($ Id.VSub_Number '$1'))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: get_version_in_dir
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'search_path='> ($ Id.VSub_Number '$2')})
            (C {<local>} {<Id.Lit_VarLike 'legacy_filenames='> ($ Id.VSub_Number '$3')})
            (C {<local>} {<asdf_version>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:asdf_version)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<parse_asdf_version_file>} 
                            {(DQ ($ Id.VSub_DollarName '$search_path') <'/.tool-versions'>)} {(DQ ($ Id.VSub_DollarName '$plugin_name'))}
                          )
                      )
                    }
                  spids: [608]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-n>} 
                              {(DQ ($ Id.VSub_DollarName '$asdf_version'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$asdf_version') <'|'> 
                          ($ Id.VSub_DollarName '$search_path') <'/.tool-versions'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [624 637]
                )
              ]
            )
            (command.ForEach
              iter_name: filename
              iter_words: [{($ Id.VSub_DollarName '$legacy_filenames')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<local>} {<legacy_version>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:legacy_version)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<parse_legacy_version_file>} 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$search_path') <'/'> 
                                        ($ Id.VSub_DollarName '$filename')
                                      )
                                    } {(DQ ($ Id.VSub_DollarName '$plugin_name'))}
                                  )
                              )
                            }
                          spids: [676]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-n>} 
                                      {(DQ ($ Id.VSub_DollarName '$legacy_version'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$legacy_version') <'|'> 
                                  ($ Id.VSub_DollarName '$search_path') <'/'> ($ Id.VSub_DollarName '$filename')
                                )
                              }
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [693 706]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: find_version
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'search_path='> ($ Id.VSub_Number '$2')})
            (C {<local>} {<version>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:version)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<get_version_from_env>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))})
                      )
                    }
                  spids: [758]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$version'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName '$version'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [768 781]
                )
              ]
            )
            (C {<local>} {<plugin_path>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:plugin_path)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<get_plugin_path>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))})
                      )
                    }
                  spids: [805]
                )
              ]
            )
            (C {<local>} {<legacy_config>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:legacy_config)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<get_asdf_config_value>} {(DQ <legacy_version_file>)})
                      )
                    }
                  spids: [820]
                )
              ]
            )
            (C {<local>} {<legacy_list_filenames_script>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:legacy_list_filenames_script)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name plugin_path) <'/bin/list-legacy-filenames'>)}
                  spids: [835]
                )
              ]
            )
            (C {<local>} {<Id.Lit_VarLike 'legacy_filenames='> (DQ )})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<Id.Lit_LBracket '['>} 
                                  {(DQ ($ Id.VSub_DollarName '$legacy_config'))} {<Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {(DQ ($ Id.VSub_DollarName '$legacy_list_filenames_script'))} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:legacy_filenames)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<bash>} 
                                    {(DQ ($ Id.VSub_DollarName '$legacy_list_filenames_script'))}
                                  )
                              )
                            }
                          spids: [884]
                        )
                      ]
                    )
                  ]
                  spids: [852 881]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$search_path'))} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'/'>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:version)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<get_version_in_dir>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))} 
                                    {(DQ ($ Id.VSub_DollarName '$search_path'))} {(DQ ($ Id.VSub_DollarName '$legacy_filenames'))}
                                  )
                              )
                            }
                          spids: [919]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-n>} 
                                      {(DQ ($ Id.VSub_DollarName '$version'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} {(DQ ($ Id.VSub_DollarName '$version'))})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [937 950]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:search_path)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<dirname>} {(DQ ($ Id.VSub_DollarName '$search_path'))})
                              )
                            }
                          spids: [968]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {<get_version_in_dir>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))} 
              {(DQ ($ Id.VSub_DollarName '$HOME'))} {(DQ ($ Id.VSub_DollarName '$legacy_filenames'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: get_version_from_env
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<upcase_name>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:upcase_name)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))})
                              (C {<tr>} {(SQ <'[:lower:]'>)} {(SQ <'[:upper:]'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [1018]
                )
              ]
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'version_env_var='> 
                (DQ <ASDF_> (${ Id.VSub_Name upcase_name) <_VERSION>)
              }
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'version='> 
                (braced_var_sub
                  token: <Id.VSub_Name version_env_var>
                  prefix_op: (Id.VSub_Bang)
                )
              }
            )
            (C {<echo>} {(DQ ($ Id.VSub_DollarName '$version'))})
          ]
        )
    )
    (command.ShFunction
      name: find_install_path
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'version='> ($ Id.VSub_Number '$2')})
            (command.Simple
              words: [{<read>} {<-a>} {<version_info>}]
              redirects: [
                (redir
                  op: <Id.Redir_TLess '<<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {(DQ ($ Id.VSub_DollarName '$version'))}
                )
              ]
              more_env: [(env_pair name:IFS val:{(SQ <':'>)} spids:[1094])]
              do_fork: T
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$version'))} 
                              {<Id.Lit_Equals '='>} {(DQ <system>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<echo>} {(DQ )})]
                  spids: [1113 1130]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name version_info>
                                    bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                                  )
                                )
                              } {<Id.Lit_Equals '='>} {(DQ <ref>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<local>} 
                      {<Id.Lit_VarLike 'install_type='> 
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name version_info>
                            bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                          )
                        )
                      }
                    )
                    (C {<local>} 
                      {<Id.Lit_VarLike 'version='> 
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name version_info>
                            bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>})
                          )
                        )
                      }
                    )
                    (C {<get_install_path>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))} 
                      {(DQ ($ Id.VSub_DollarName '$install_type'))} {(DQ ($ Id.VSub_DollarName '$version'))}
                    )
                  ]
                  spids: [1139 1161]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name version_info>
                                    bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                                  )
                                )
                              } {<Id.Lit_Equals '='>} {(DQ <path>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<local>} {<Id.Lit_VarLike 'install_type='> (DQ <path>)})
                    (C {<local>} {<Id.Lit_VarLike 'version='> (DQ <path>)})
                    (C {<echo>} 
                      {
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name version_info>
                            bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>})
                          )
                        )
                      }
                    )
                  ]
                  spids: [1205 1227]
                )
              ]
              else_action: [
                (C {<local>} {<Id.Lit_VarLike 'install_type='> (DQ <version>)})
                (C {<local>} 
                  {<Id.Lit_VarLike 'version='> 
                    (DQ 
                      (braced_var_sub
                        token: <Id.VSub_Name version_info>
                        bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                      )
                    )
                  }
                )
                (C {<get_install_path>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))} 
                  {(DQ ($ Id.VSub_DollarName '$install_type'))} {(DQ ($ Id.VSub_DollarName '$version'))}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: get_executable_path
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'version='> ($ Id.VSub_Number '$2')})
            (C {<local>} {<Id.Lit_VarLike 'executable_path='> ($ Id.VSub_Number '$3')})
            (C {<check_if_version_exists>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))} 
              {(DQ ($ Id.VSub_DollarName '$version'))}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$version'))} 
                              {<Id.Lit_Equals '='>} {(DQ <system>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:path)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<echo>} {(DQ ($ Id.VSub_DollarName '$PATH'))})
                                      (C {<sed>} {<-e>} 
                                        {
                                          (DQ <'s|'> ($ Id.VSub_DollarName '$ASDF_DIR') 
                                            <'/shims||g; s|::|:|g'>
                                          )
                                        }
                                      )
                                    ]
                                    negated: F
                                  )
                              )
                            }
                          spids: [1376]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cmd)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<basename>} {(DQ ($ Id.VSub_DollarName '$executable_path'))})
                              )
                            }
                          spids: [1398]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cmd_path)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    words: [{<which>} {(DQ ($ Id.VSub_DollarName '$cmd'))}]
                                    redirects: [
                                      (redir
                                        op: <Id.Redir_GreatAnd '2>&'>
                                        loc: (redir_loc.Fd fd:2)
                                        arg: {<1>}
                                      )
                                    ]
                                    more_env: [
                                      (env_pair
                                        name: PATH
                                        val: {($ Id.VSub_DollarName '$path')}
                                        spids: [1410]
                                      )
                                    ]
                                    do_fork: T
                                  )
                              )
                            }
                          spids: [1408]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1428 1441]
                        )
                      ]
                    )
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName '$cmd_path'))})
                  ]
                  spids: [1356 1373]
                )
              ]
              else_action: [
                (C {<local>} {<install_path>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:install_path)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (C {<find_install_path>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))} 
                                {(DQ ($ Id.VSub_DollarName '$version'))}
                              )
                          )
                        }
                      spids: [1467]
                    )
                  ]
                )
                (C {<echo>} 
                  {(DQ (${ Id.VSub_Name install_path)) <'/'> (DQ (${ Id.VSub_Name executable_path))}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: parse_asdf_version_file
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'file_path='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$2')})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName '$file_path'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<local>} {<version>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:version)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<grep>} {(DQ (${ Id.VSub_Name plugin_name) <' '>)} 
                                        {(DQ ($ Id.VSub_DollarName '$file_path'))}
                                      )
                                      (C {<sed>} {<-e>} 
                                        {(DQ <'s/^'> (${ Id.VSub_Name plugin_name) <' //'>)}
                                      )
                                    ]
                                    negated: F
                                  )
                              )
                            }
                          spids: [1542]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-n>} 
                                      {(DQ ($ Id.VSub_DollarName '$version'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} {(DQ ($ Id.VSub_DollarName '$version'))})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [1573 1586]
                        )
                      ]
                    )
                  ]
                  spids: [1521 1534]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: parse_legacy_version_file
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'file_path='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$2')})
            (C {<local>} {<plugin_path>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:plugin_path)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<get_plugin_path>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))})
                      )
                    }
                  spids: [1634]
                )
              ]
            )
            (C {<local>} {<parse_legacy_script>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:parse_legacy_script)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name plugin_path) <'/bin/parse-legacy-file'>)}
                  spids: [1649]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName '$file_path'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-f>} 
                                      {(DQ ($ Id.VSub_DollarName '$parse_legacy_script'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<bash>} {(DQ ($ Id.VSub_DollarName '$parse_legacy_script'))} 
                              {(DQ ($ Id.VSub_DollarName '$file_path'))}
                            )
                          ]
                          spids: [1675 1688]
                        )
                      ]
                      else_action: [(C {<cat>} {(DQ ($ Id.VSub_DollarName '$file_path'))})]
                    )
                  ]
                  spids: [1659 1672]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: get_preset_version_for
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<search_path>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:search_path)
                  op: assign_op.Equal
                  rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>}))}
                  spids: [1738]
                )
              ]
            )
            (C {<local>} {<version_and_path>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:version_and_path)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<find_version>} {(DQ ($ Id.VSub_DollarName '$plugin_name'))} 
                            {(DQ ($ Id.VSub_DollarName '$search_path'))}
                          )
                      )
                    }
                  spids: [1749]
                )
              ]
            )
            (C {<local>} {<version>})
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:version)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                words: [{<cut>} {<-d>} {(SQ <'|'>)} {<-f>} {<1>}]
                                redirects: [
                                  (redir
                                    op: <Id.Redir_TLess '<<<'>
                                    loc: (redir_loc.Fd fd:0)
                                    arg: {(DQ ($ Id.VSub_DollarName '$version_and_path'))}
                                  )
                                ]
                                do_fork: T
                              )
                          )
                        }
                      spids: [1768]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (C {<echo>} {(DQ ($ Id.VSub_DollarName '$version'))})
          ]
        )
    )
    (command.ShFunction
      name: get_asdf_config_value_from_file
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'config_path='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'key='> ($ Id.VSub_Number '$2')})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                              {(DQ ($ Id.VSub_DollarName '$config_path'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [1821 1836]
                )
              ]
            )
            (C {<local>} {<result>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:result)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<grep>} {<-E>} 
                                {
                                  (DQ <'^'> <Id.Lit_BadBackslash '\\'> <'s*'> 
                                    ($ Id.VSub_DollarName '$key') <Id.Lit_BadBackslash '\\'> <'s*='>
                                  )
                                } {(DQ ($ Id.VSub_DollarName '$config_path'))}
                              )
                              (C {<awk>} {<-F>} {(SQ <'='>)} {(SQ <'{ gsub(/ /, "", $2); print $2 }'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [1853]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$result'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<echo>} {(DQ ($ Id.VSub_DollarName '$result'))})]
                  spids: [1888 1901]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: get_asdf_config_value
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'key='> ($ Id.VSub_Number '$1')})
            (C {<local>} 
              {<Id.Lit_VarLike 'config_path='> 
                (braced_var_sub
                  token: <Id.VSub_Name AZDF_CONFIG_FILE>
                  suffix_op: 
                    (suffix_op.Unary
                      tok: <Id.VTest_ColonHyphen ':-'>
                      arg_word: {(DQ ($ Id.VSub_DollarName '$HOME') <'/.asdfrc'>)}
                    )
                )
              }
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'default_config_path='> 
                (braced_var_sub
                  token: <Id.VSub_Name AZDF_CONFIG_DEFAULT_FILE>
                  suffix_op: 
                    (suffix_op.Unary
                      tok: <Id.VTest_ColonHyphen ':-'>
                      arg_word: 
                        {
                          (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                            <'/defaults'>
                          )
                        }
                    )
                )
              }
            )
            (C {<local>} {<result>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:result)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<get_asdf_config_value_from_file>} 
                            {(DQ ($ Id.VSub_DollarName '$config_path'))} {(DQ ($ Id.VSub_DollarName '$key'))}
                          )
                      )
                    }
                  spids: [1963]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$result'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<echo>} {(DQ ($ Id.VSub_DollarName '$result'))})]
                  spids: [1978 1991]
                )
              ]
              else_action: [
                (C {<get_asdf_config_value_from_file>} 
                  {(DQ ($ Id.VSub_DollarName '$default_config_path'))} {(DQ ($ Id.VSub_DollarName '$key'))}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: repository_needs_update
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<update_file_dir>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:update_file_dir)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                        <'/tmp'>
                      )
                    }
                  spids: [2032]
                )
              ]
            )
            (C {<local>} {<update_file_name>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:update_file_name)
                  op: assign_op.Equal
                  rhs: {(DQ <repo-updated>)}
                  spids: [2046]
                )
              ]
            )
            (C {<local>} {<find_result>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:find_result)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<find>} {(DQ ($ Id.VSub_DollarName '$update_file_dir'))} {<-name>} 
                            {(DQ ($ Id.VSub_DollarName '$update_file_name'))} {<-type>} {<f>} {<-mtime>} {<Id.Lit_Other '+'> <1>} {<-print>}
                          )
                      )
                    }
                  spids: [2061]
                )
              ]
            )
            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$find_result'))} 
              {<Id.Lit_RBracket ']'>}
            )
          ]
        )
    )
    (command.ShFunction
      name: initialize_or_update_repository
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<repository_url>})
            (C {<local>} {<repository_path>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:repository_url)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<asdf_repository_url>})
                      )
                    }
                  spids: [2119]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:repository_path)
                  op: assign_op.Equal
                  rhs: 
                    {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                      <'/repository'>
                    }
                  spids: [2125]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} 
                              {(DQ ($ Id.VSub_DollarName '$repository_path'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'initializing plugin repository...'>)})
                    (C {<git>} {<clone>} {(DQ ($ Id.VSub_DollarName '$repository_url'))} 
                      {(DQ ($ Id.VSub_DollarName '$repository_path'))}
                    )
                  ]
                  spids: [2133 2148]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<repository_needs_update>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'updating plugin repository...'>)})
                    (command.Subshell
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DAmp]
                          children: [
                            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$repository_path'))})
                            (C {<git>} {<fetch>})
                            (C {<git>} {<reset>} {<--hard>} {<'origin/master'>})
                          ]
                        )
                    )
                  ]
                  spids: [2171 2176]
                )
              ]
            )
            (C {<mkdir>} {<-p>} 
              {
                (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                  <'/tmp'>
                )
              }
            )
            (C {<touch>} 
              {
                (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                  <'/tmp/repo-updated'>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: get_plugin_source_url
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'plugin_name='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<plugin_config>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:plugin_config)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<asdf_dir>})) 
                        <'/repository/plugins/'> ($ Id.VSub_DollarName '$plugin_name')
                      )
                    }
                  spids: [2258]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                              {(DQ ($ Id.VSub_DollarName '$plugin_config'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<grep>} {(DQ <repository>)} {(DQ ($ Id.VSub_DollarName '$plugin_config'))})
                        (C {<awk>} {<-F> (SQ <'='>)} {(SQ <'{print $2}'>)})
                        (C {<sed>} {(SQ <'s/ //'>)})
                      ]
                      negated: F
                    )
                  ]
                  spids: [2270 2283]
                )
              ]
            )
          ]
        )
    )
  ]
)