Always expand ~ when starting scripts.
This commit is contained in:
parent
84a41cf9cf
commit
4891fe9457
@ -967,8 +967,10 @@ class CommandDispatcher:
|
|||||||
log.procs.debug("Executing {} with args {}, userscript={}".format(
|
log.procs.debug("Executing {} with args {}, userscript={}".format(
|
||||||
cmd, args, userscript))
|
cmd, args, userscript))
|
||||||
if userscript:
|
if userscript:
|
||||||
|
# ~ expansion is handled by the userscript module.
|
||||||
self.run_userscript(cmd, *args, verbose=verbose)
|
self.run_userscript(cmd, *args, verbose=verbose)
|
||||||
else:
|
else:
|
||||||
|
cmd = os.path.expanduser(cmd)
|
||||||
proc = guiprocess.GUIProcess(self._win_id, what='command',
|
proc = guiprocess.GUIProcess(self._win_id, what='command',
|
||||||
verbose=verbose,
|
verbose=verbose,
|
||||||
parent=self._tabbed_browser)
|
parent=self._tabbed_browser)
|
||||||
@ -992,7 +994,6 @@ class CommandDispatcher:
|
|||||||
args: Arguments to pass to the userscript.
|
args: Arguments to pass to the userscript.
|
||||||
verbose: Show notifications when the command started/exited.
|
verbose: Show notifications when the command started/exited.
|
||||||
"""
|
"""
|
||||||
cmd = os.path.expanduser(cmd)
|
|
||||||
env = {
|
env = {
|
||||||
'QUTE_MODE': 'command',
|
'QUTE_MODE': 'command',
|
||||||
}
|
}
|
||||||
|
@ -343,6 +343,7 @@ def run(cmd, *args, win_id, env, verbose=False):
|
|||||||
user_agent = config.get('network', 'user-agent')
|
user_agent = config.get('network', 'user-agent')
|
||||||
if user_agent is not None:
|
if user_agent is not None:
|
||||||
env['QUTE_USER_AGENT'] = user_agent
|
env['QUTE_USER_AGENT'] = user_agent
|
||||||
|
cmd = os.path.expanduser(cmd)
|
||||||
runner.run(cmd, *args, env=env, verbose=verbose)
|
runner.run(cmd, *args, env=env, verbose=verbose)
|
||||||
runner.finished.connect(commandrunner.deleteLater)
|
runner.finished.connect(commandrunner.deleteLater)
|
||||||
runner.finished.connect(runner.deleteLater)
|
runner.finished.connect(runner.deleteLater)
|
||||||
|
Loading…
Reference in New Issue
Block a user