From 0b26e295bc22644a0c25041bdc3f64721ee220a5 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 3 Apr 2015 14:44:44 +0200 Subject: [PATCH] Revert fixes for quotes/spaces in maxsplit cmds. Revert "Fix maxsplit-splitting with empty args (""/'')." This reverts commit 46396cce1e45001bfbb2aa81abafdcfed89af3f6. Revert "Remove quotes with split=False commands." This reverts commit 81bc5dae94adcc35eb9e9b979d710c4faf573d29. See #564 and #453. --- qutebrowser/commands/runners.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py index ae5ad1ded..478bf87df 100644 --- a/qutebrowser/commands/runners.py +++ b/qutebrowser/commands/runners.py @@ -19,8 +19,6 @@ """Module containing command managers (SearchRunner and CommandRunner).""" -import re - from PyQt5.QtCore import pyqtSlot, pyqtSignal, QObject, QUrl from PyQt5.QtWebKitWidgets import QWebPage @@ -266,16 +264,8 @@ class CommandRunner(QObject): else: self._args = [] maxsplit = i + self._cmd.maxsplit + flag_arg_count - args = split.simple_split(argstr, keep=keep, - maxsplit=maxsplit) - for s in args: - # remove quotes and replace \" by " - if s == '""' or s == "''": - s = '' - else: - s = re.sub(r"""(^|[^\\])["']""", r'\1', s) - s = re.sub(r"""\\(["'])""", r'\1', s) - self._args.append(s) + self._args = split.simple_split(argstr, keep=keep, + maxsplit=maxsplit) break else: # If there are only flags, we got it right on the first try