def run(self, edit, cmd=None):
        global current_path
        if current_path is None:
            self.view.window().run_command('close')

        # Get line to be run and clean it.
        cmd = self.view.substr(self.view.line(self.view.sel()[0].a))
        if cmd.startswith(CLI_PROMPT[0]):
            cmd = cmd[1:].strip()

        params = dict(cmd=cmd, cwd=current_path, append=True,
                      # send only first token (for command search)
                      display_name=cmd.split()[0])
        self.view.run_command('hg_command_runner', params)
dataset/ETHPy150Open guillermooo/Mercurial/mercurial_cli.py/SublimeHgSendLine.run/original