Restore -e and -x support
This commit is contained in:
parent
e6ad61831d
commit
bdbe359767
|
@ -94,7 +94,6 @@ WM_WINDOW_ROLE property on the window')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
configobj.options_set(options)
|
configobj.options_set(options)
|
||||||
# FIXME: Map all the other bits of options to configobj
|
|
||||||
|
|
||||||
if util.DEBUG == True:
|
if util.DEBUG == True:
|
||||||
dbg('OptionParse::parse_options: command line options: %s' % options)
|
dbg('OptionParse::parse_options: command line options: %s' % options)
|
||||||
|
|
|
@ -948,9 +948,20 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
|
|
||||||
self.vte.grab_focus()
|
self.vte.grab_focus()
|
||||||
|
|
||||||
if self.config['use_custom_command']:
|
options = self.config.options_get()
|
||||||
|
if options.command:
|
||||||
|
command = options.command
|
||||||
|
options.command = None
|
||||||
|
elif options.execute:
|
||||||
|
command = options.execute
|
||||||
|
options.execute = None
|
||||||
|
elif self.config['use_custom_command']:
|
||||||
command = self.config['custom_command']
|
command = self.config['custom_command']
|
||||||
|
|
||||||
|
if type(command) is list:
|
||||||
|
shell = util.path_lookup(command[0])
|
||||||
|
args = command
|
||||||
|
else:
|
||||||
shell = util.shell_lookup()
|
shell = util.shell_lookup()
|
||||||
|
|
||||||
if self.config['login_shell']:
|
if self.config['login_shell']:
|
||||||
|
@ -970,6 +981,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
dbg('Forking shell: "%s" with args: %s' % (shell, args))
|
||||||
self.pid = self.vte.fork_command(command=shell, argv=args, envv=[],
|
self.pid = self.vte.fork_command(command=shell, argv=args, envv=[],
|
||||||
loglastlog=login, logwtmp=update_records,
|
loglastlog=login, logwtmp=update_records,
|
||||||
logutmp=update_records, directory=self.cwd)
|
logutmp=update_records, directory=self.cwd)
|
||||||
|
|
|
@ -101,7 +101,7 @@ def path_lookup(command):
|
||||||
dbg('path_lookup: PATH not set in environment, using fallbacks')
|
dbg('path_lookup: PATH not set in environment, using fallbacks')
|
||||||
paths = ['/usr/local/bin', '/usr/bin', '/bin']
|
paths = ['/usr/local/bin', '/usr/bin', '/bin']
|
||||||
|
|
||||||
dbg('path_lookup: Using %d paths: %s', (len(paths), paths))
|
dbg('path_lookup: Using %d paths: %s' % (len(paths), paths))
|
||||||
|
|
||||||
for path in paths:
|
for path in paths:
|
||||||
target = os.path.join(path, command)
|
target = os.path.join(path, command)
|
||||||
|
|
Loading…
Reference in New Issue