(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:currentVersion)
          op: assign_op.Equal
          rhs: {(DQ <1.11.1>)}
          spids: [7]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:configuredClient)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [12]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:configuredPython)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [16]
        )
      ]
    )
    (command.ShFunction
      name: getConfiguredClient
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              words: [{<command>} {<-v>} {<curl>}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_AndGreat '&>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:configuredClient)
                          op: assign_op.Equal
                          rhs: {(DQ <curl>)}
                          spids: [47]
                        )
                      ]
                    )
                  ]
                  spids: [31 44]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              words: [{<command>} {<-v>} {<wget>}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_AndGreat '&>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:configuredClient)
                          op: assign_op.Equal
                          rhs: {(DQ <wget>)}
                          spids: [69]
                        )
                      ]
                    )
                  ]
                  spids: [53 66]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              words: [{<command>} {<-v>} {<fetch>}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_AndGreat '&>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:configuredClient)
                          op: assign_op.Equal
                          rhs: {(DQ <fetch>)}
                          spids: [91]
                        )
                      ]
                    )
                  ]
                  spids: [75 88]
                )
              ]
              else_action: [
                (C {<echo>} 
                  {(DQ <'Error: This tool reqires either curl, wget, or fetch to be installed.'>)}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: getConfiguredPython
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              words: [{<command>} {<-v>} {<python2>}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_AndGreat '&>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:configuredPython)
                          op: assign_op.Equal
                          rhs: {(DQ <python2>)}
                          spids: [142]
                        )
                      ]
                    )
                  ]
                  spids: [126 139]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              words: [{<command>} {<-v>} {<python>}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_AndGreat '&>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:configuredPython)
                          op: assign_op.Equal
                          rhs: {(DQ <python>)}
                          spids: [164]
                        )
                      ]
                    )
                  ]
                  spids: [148 161]
                )
              ]
              else_action: [
                (C {<echo>} {(DQ <'Error: This tool requires python 2 to be installed.'>)})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: python
      body: 
        (BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$configuredPython'))}
              arms: [
                (case_arm
                  pat_list: [{<python2>}]
                  action: [(C {<python2>} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [207 208 215 -1]
                )
                (case_arm
                  pat_list: [{<python>}]
                  action: [(C {<python>} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [218 219 226 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: httpGet
      body: 
        (BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$configuredClient'))}
              arms: [
                (case_arm
                  pat_list: [{<curl>}]
                  action: [(C {<curl>} {<-A>} {<curl>} {<-s>} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [253 254 267 -1]
                )
                (case_arm
                  pat_list: [{<wget>}]
                  action: [(C {<wget>} {<-qO->} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [270 271 280 -1]
                )
                (case_arm
                  pat_list: [{<fetch>}]
                  action: [(C {<fetch>} {<-o>} {(DQ <...>)})]
                  spids: [283 284 293 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: checkInternet
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<echo>} {<-e>} 
                  {
                    (DQ <'GET http://google.com HTTP/1.0'> <Id.Lit_BadBackslash '\\'> <n> 
                      <Id.Lit_BadBackslash '\\'> <n>
                    )
                  }
                )
                (command.Simple
                  words: [{<nc>} {<google.com>} {<80>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                    (redir
                      op: <Id.Redir_GreatAnd '2>&'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<1>}
                    )
                  ]
                  do_fork: T
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [339 352]
                )
              ]
              else_action: [
                (command.Simple
                  words: [{<echo>} {(DQ <'Error: no active internet connection'>)}]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  do_fork: T
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: update
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:repositoryName)
                  op: assign_op.Equal
                  rhs: {(DQ <Bash-Snippets>)}
                  spids: [408]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:githubUserName)
                  op: assign_op.Equal
                  rhs: {(DQ <alexanderepstein>)}
                  spids: [417]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:nameOfInstallFile)
                  op: assign_op.Equal
                  rhs: {(DQ <install.sh>)}
                  spids: [426]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:latestVersion)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<httpGet>} 
                                {<https> <Id.Lit_Colon ':'> <'//api.github.com/repos/'> 
                                  ($ Id.VSub_DollarName '$githubUserName') <'/'> ($ Id.VSub_DollarName '$repositoryName') <'/tags'>
                                }
                              )
                              (C {<grep>} {<-Eo>} {(SQ <'"name":.*?[^\\\\]",'>)})
                              (C {<head>} {<-1>})
                              (C {<grep>} {<-Eo>} {(DQ <'[0-9.]+'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [435]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.LogicalOr
                                  left: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {($ Id.VSub_DollarName '$currentVersion')}
                                      right: {(DQ )}
                                    )
                                  right: 
                                    (bool_expr.LogicalOr
                                      left: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: {($ Id.VSub_DollarName '$repositoryName')}
                                          right: {(DQ )}
                                        )
                                      right: 
                                        (bool_expr.LogicalOr
                                          left: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobDEqual
                                              left: {($ Id.VSub_DollarName '$githubUserName')}
                                              right: {(DQ )}
                                            )
                                          right: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobDEqual
                                              left: {($ Id.VSub_DollarName '$nameOfInstallFile')}
                                              right: {(DQ )}
                                            )
                                        )
                                    )
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {(DQ <'Error: update utility has not been configured correctly.'>)}
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [479 519]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName '$latestVersion')}
                                  right: {(DQ )}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'Error: no active internet connection'>)}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [537 550]
                )
              ]
              else_action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobNEqual
                                      left: {(DQ ($ Id.VSub_DollarName '$latestVersion'))}
                                      right: {(DQ ($ Id.VSub_DollarName '$currentVersion'))}
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (C {<echo>} 
                          {(DQ <'Version '> ($ Id.VSub_DollarName '$latestVersion') <' available'>)}
                        )
                        (C {<echo>} {<-n>} 
                          {
                            (DQ <'Do you wish to update '> ($ Id.VSub_DollarName '$repositoryName') 
                              <' [Y/n]: '>
                            )
                          }
                        )
                        (C {<read>} {<-r>} {<answer>})
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.LogicalOr
                                              left: 
                                                (bool_expr.Binary
                                                  op_id: Id.BoolBinary_GlobDEqual
                                                  left: {(DQ ($ Id.VSub_DollarName '$answer'))}
                                                  right: {(DQ <Y>)}
                                                )
                                              right: 
                                                (bool_expr.Binary
                                                  op_id: Id.BoolBinary_GlobDEqual
                                                  left: {(DQ ($ Id.VSub_DollarName '$answer'))}
                                                  right: {(DQ <y>)}
                                                )
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<cd>} {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>)})
                                    (BraceGroup
                                      children: [
                                        (command.Sentence
                                          child: (C {<echo>} {(SQ <'Update Failed'>)})
                                          terminator: <Id.Op_Semi _>
                                        )
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Sentence
                                              child: 
                                                (command.DBracket
                                                  expr: 
                                                    (bool_expr.Unary
                                                      op_id: Id.BoolUnary_d
                                                      child: 
                                                        {
                                                          (word_part.TildeSub
                                                            token: <Id.Lit_TildeLike '~'>
                                                          ) <'/'> ($ Id.VSub_DollarName '$repositoryName')
                                                        }
                                                    )
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                        )
                                      action: [
                                        (command.Sentence
                                          child: 
                                            (command.AndOr
                                              ops: [Id.Op_DPipe]
                                              children: [
                                                (C {<rm>} {<-r>} {<-f>} 
                                                  {($ Id.VSub_DollarName '$repositoryName')}
                                                )
                                                (BraceGroup
                                                  children: [
                                                    (command.Sentence
                                                      child: 
                                                        (C {<echo>} 
                                                          {
                                                            (DQ 
                                                              <
'Permissions Error: try running the update as sudo'
                                                              >
                                                            )
                                                          }
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                    (command.Sentence
                                                      child: 
                                                        (command.ControlFlow
                                                          token: <Id.ControlFlow_Exit exit>
                                                          arg_word: {<1>}
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                  ]
                                                )
                                              ]
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [675 688]
                                    )
                                  ]
                                )
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<git>} {<clone>} 
                                      {
                                        (DQ <'https://github.com/'> 
                                          ($ Id.VSub_DollarName '$githubUserName') <'/'> ($ Id.VSub_DollarName '$repositoryName')
                                        )
                                      }
                                    )
                                    (BraceGroup
                                      children: [
                                        (command.Sentence
                                          child: 
                                            (C {<echo>} {(DQ <'Couldn\'t download latest version'>)})
                                          terminator: <Id.Op_Semi _>
                                        )
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<cd>} {($ Id.VSub_DollarName '$repositoryName')})
                                    (BraceGroup
                                      children: [
                                        (command.Sentence
                                          child: (C {<echo>} {(SQ <'Update Failed'>)})
                                          terminator: <Id.Op_Semi _>
                                        )
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (command.AndOr
                                  ops: [Id.Op_DPipe Id.Op_DPipe]
                                  children: [
                                    (command.Simple
                                      words: [
                                        {<git>}
                                        {<checkout>}
                                        {(DQ <v> ($ Id.VSub_DollarName '$latestVersion'))}
                                      ]
                                      redirects: [
                                        (redir
                                          op: <Id.Redir_Great '2>'>
                                          loc: (redir_loc.Fd fd:2)
                                          arg: {<'/dev/null'>}
                                        )
                                      ]
                                      do_fork: T
                                    )
                                    (command.Simple
                                      words: [
                                        {<git>}
                                        {<checkout>}
                                        {(DQ ($ Id.VSub_DollarName '$latestVersion'))}
                                      ]
                                      redirects: [
                                        (redir
                                          op: <Id.Redir_Great '2>'>
                                          loc: (redir_loc.Fd fd:2)
                                          arg: {<'/dev/null'>}
                                        )
                                      ]
                                      do_fork: T
                                    )
                                    (C {<echo>} 
                                      {
                                        (DQ 
                                          <
'Couldn\'t git checkout to stable release, updating to latest commit.'
                                          >
                                        )
                                      }
                                    )
                                  ]
                                )
                                (C {<chmod>} {<a> <Id.Lit_Other '+'> <x>} {<install.sh>})
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<'./'> ($ Id.VSub_DollarName '$nameOfInstallFile')} 
                                      {(DQ <update>)}
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Exit exit>
                                      arg_word: {<1>}
                                    )
                                  ]
                                )
                                (C {<cd>} {<..>})
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<rm>} {<-r>} {<-f>} {($ Id.VSub_DollarName '$repositoryName')})
                                    (BraceGroup
                                      children: [
                                        (command.Sentence
                                          child: 
                                            (C {<echo>} 
                                              {
                                                (DQ 
                                                  <
'Permissions Error: update succesfull but cannot delete temp files located at ~/'
                                                  > ($ Id.VSub_DollarName '$repositoryName') <' delete this directory with sudo'>
                                                )
                                              }
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                              spids: [618 647]
                            )
                          ]
                          else_action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                        )
                      ]
                      spids: [571 588]
                    )
                  ]
                  else_action: [
                    (C {<echo>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$repositoryName') 
                          <' is already the latest version'>
                        )
                      }
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: usage
      body: 
        (BraceGroup
          children: [
            (C {<echo>} {(DQ <Short>)})
            (C {<echo>} {(DQ <'Description: Unmasks shortended urls.'>)})
            (C {<echo>} {(DQ <'Usage: short [shortURL] or short [flag]'>)})
            (C {<echo>} {(DQ <'  -u Update Bash-Snippet Tools'>)})
            (C {<echo>} {(DQ <'  -h Show the help'>)})
            (C {<echo>} {(DQ <'  -v Get the tool version'>)})
            (C {<echo>} {(DQ <'Example:'>)})
            (C {<echo>} {(DQ <'   Input: short tinyurl.com/jhkj'>)})
            (C {<echo>} {(DQ <'   Output: http://possiblemaliciouswebsiteornot.com'>)})
          ]
        )
    )
    (command.ShFunction
      name: expandURL
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:testURL)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [(C {<echo>} {($ Id.VSub_Number '$1')}) (C {<cut>} {<-c1-8>})]
                            negated: F
                          )
                      )
                    }
                  spids: [981]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobNEqual
                                  left: {($ Id.VSub_DollarName '$testURL')}
                                  right: {(DQ <'https://'>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:testURL)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<echo>} {($ Id.VSub_Number '$1')})
                                      (C {<cut>} {<-c1-7>})
                                    ]
                                    negated: F
                                  )
                              )
                            }
                          spids: [1014]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobNEqual
                                          left: {($ Id.VSub_DollarName '$testURL')}
                                          right: {(DQ <'http://'>)}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:url)
                                  op: assign_op.Equal
                                  rhs: {(DQ <'http://'> ($ Id.VSub_Number '$1'))}
                                  spids: [1047]
                                )
                              ]
                            )
                          ]
                          spids: [1030 1044]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:url)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_Number '$1')}
                              spids: [1057]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [997 1011]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:url)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_Number '$1')}
                      spids: [1067]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:response)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<httpGet>} 
                            {<http> <Id.Lit_Colon ':'> <'//x.datasig.io/short'> <Id.Lit_QMark '?'> 
                              <Id.Lit_VarLike 'url='> ($ Id.VSub_DollarName '$url')
                            }
                          )
                      )
                    }
                  spids: [1074]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:errorCheck)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_DollarName '$response')})
                              (command.Simple
                                words: [
                                  {<python>}
                                  {<-c>}
                                  {
                                    (DQ 
                                      <
'import sys, json; print json.load(sys.stdin)[\'/short\'][\'message\']'
                                      >
                                    )
                                  }
                                ]
                                redirects: [
                                  (redir
                                    op: <Id.Redir_Great '2>'>
                                    loc: (redir_loc.Fd fd:2)
                                    arg: {<'/dev/null'>}
                                  )
                                ]
                                do_fork: T
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [1087]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName '$errorCheck')}
                                  right: {(DQ <'Error in /short'>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'Error: 404 could not find the website'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1110 1124]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:expandedURL)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_DollarName '$response')})
                              (command.Simple
                                words: [
                                  {<python>}
                                  {<-c>}
                                  {
                                    (DQ 
                                      <
'import sys, json; print json.load(sys.stdin)[\'/short\'][\'destination\']'
                                      >
                                    )
                                  }
                                ]
                                redirects: [
                                  (redir
                                    op: <Id.Redir_Great '2>'>
                                    loc: (redir_loc.Fd fd:2)
                                    arg: {<'/dev/null'>}
                                  )
                                ]
                                do_fork: T
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [1141]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: printResults
      body: 
        (BraceGroup
          children: [
            (C {<echo>} {(DQ <'====================================================================='>)})
            (C {<echo>} {(DQ <'Short URL: '> ($ Id.VSub_DollarName '$url'))})
            (C {<echo>} {(DQ <'Expanded URL: '> ($ Id.VSub_DollarName '$expandedURL'))})
            (C {<echo>} {(DQ <'====================================================================='>)})
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<getConfiguredPython>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<getConfiguredClient>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<checkInternet>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: (C {<getopts>} {(DQ <uvh>)} {<opt>})
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName '$opt')}
              arms: [
                (case_arm
                  pat_list: [{(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'>)}]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'Invalid option: -'> ($ Id.VSub_DollarName '$OPTARG'))}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1252 1253 1272 -1]
                )
                (case_arm
                  pat_list: [{<h>}]
                  action: [
                    (C {<usage>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [1275 1276 1287 -1]
                )
                (case_arm
                  pat_list: [{<v>}]
                  action: [
                    (C {<echo>} {(DQ <'Version '> ($ Id.VSub_DollarName '$currentVersion'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [1290 1291 1307 -1]
                )
                (case_arm
                  pat_list: [{<u>}]
                  action: [
                    (C {<update>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [1310 1311 1322 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Colon ':'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'Option -'> ($ Id.VSub_DollarName '$OPTARG') <' requires an argument.'>)
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1325 1326 1346 -1]
                )
              ]
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_Pound '$#')}
                          right: {<0>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<usage>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})]
          spids: [1355 1368]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_Pound '$#')}
                          right: {(DQ <1>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_Number '$1')}
                                  right: {(DQ <update>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<update>})]
                  spids: [1396 1410]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_Number '$1')}
                                  right: {(DQ <help>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<usage>})]
                  spids: [1416 1431]
                )
              ]
              else_action: [
                (command.AndOr
                  ops: [Id.Op_DPipe]
                  children: [
                    (C {<expandURL>} {($ Id.VSub_Number '$1')})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                )
                (C {<printResults>})
              ]
            )
          ]
          spids: [1378 1393]
        )
      ]
      else_action: [
        (C {<echo>} {(DQ <'Error: short only accepts one argument'>)})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
  ]
)