open-download: append filename if no {} is found
This allows shortcuts like ":download-open gvim" instead of ":download-open gvim {}" to work.
This commit is contained in:
parent
8730dc6f8e
commit
017bfc9b9c
@ -554,6 +554,8 @@ class DownloadItem(QObject):
|
|||||||
|
|
||||||
cmd, *args = shlex.split(cmdline)
|
cmd, *args = shlex.split(cmdline)
|
||||||
args = [arg.replace('{}', filename) for arg in args]
|
args = [arg.replace('{}', filename) for arg in args]
|
||||||
|
if '{}' not in cmdline:
|
||||||
|
args.append(filename)
|
||||||
log.downloads.debug("Opening {} with {}"
|
log.downloads.debug("Opening {} with {}"
|
||||||
.format(filename, [cmd] + args))
|
.format(filename, [cmd] + args))
|
||||||
proc = guiprocess.GUIProcess(self._win_id, what='download')
|
proc = guiprocess.GUIProcess(self._win_id, what='download')
|
||||||
|
Loading…
Reference in New Issue
Block a user