diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 177f55456..65ea745c1 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -1094,7 +1094,7 @@ class ShellCommand(BaseType): shlex.split(value) except ValueError as e: raise configexc.ValidationError(value, str(e)) - if self.placeholder and '{}' not in self.transform(value): + if self.placeholder and '{}' not in value: raise configexc.ValidationError(value, "needs to contain a " "{}-placeholder.") diff --git a/qutebrowser/misc/editor.py b/qutebrowser/misc/editor.py index 2fa9791e9..d844cdc80 100644 --- a/qutebrowser/misc/editor.py +++ b/qutebrowser/misc/editor.py @@ -124,6 +124,6 @@ class ExternalEditor(QObject): self._proc.error.connect(self.on_proc_error) editor = config.get('general', 'editor') executable = editor[0] - args = [self._filename if arg == '{}' else arg for arg in editor[1:]] + args = [arg.replace('{}', self._filename) if '{}' in arg else arg for arg in editor[1:]] log.procs.debug("Calling \"{}\" with args {}".format(executable, args)) self._proc.start(executable, args)