code: def handle_scoping_input(self, continue_flag, cmd, text):
          
          default_split = text.partition(SELECT_SYMBOL['scope'])[2].split()
          cmd = cmd.replace(SELECT_SYMBOL['scope'], '')
  
          continue_flag = True
  
          if not default_split:
              self.default_command = ""
              print('unscoping all', file=self.output)
  
              return continue_flag, cmd
  
          while default_split:
              if not text:
                  value = ''
              else:
                  value = default_split[0]
  
              tree_path = self.default_command.split()
              tree_path.append(value)
  
              if self.completer.command_tree.in_tree(tree_path):
                  self.set_scope(value)
                  print("defaulting: " + value, file=self.output)
                  cmd = cmd.replace(SELECT_SYMBOL['scope'], '')
              elif SELECT_SYMBOL['unscope'] == default_split[0] and self.default_command.split():
  
                  value = self.default_command.split()[-1]
                  self.default_command = ' ' + ' '.join(self.default_command.split()[:-1])
  
                  if not self.default_command.strip():
                      self.default_command = self.default_command.strip()
                  print('unscoping: ' + value, file=self.output)
  
              elif SELECT_SYMBOL['unscope'] not in text:
                  print("Scope must be a valid command", file=self.output)
  
              default_split = default_split[1:]
          return continue_flag, cmd
docs: handles what to do with a scoping gesture