Restore -e and -x support

This commit is contained in:
Chris Jones 2010-01-18 22:56:43 +00:00
parent e6ad61831d
commit bdbe359767
3 changed files with 21 additions and 10 deletions

View File

@ -94,7 +94,6 @@ WM_WINDOW_ROLE property on the window')
sys.exit(1)
configobj.options_set(options)
# FIXME: Map all the other bits of options to configobj
if util.DEBUG == True:
dbg('OptionParse::parse_options: command line options: %s' % options)

View File

@ -948,18 +948,29 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
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']
shell = util.shell_lookup()
if self.config['login_shell']:
args.insert(0, "-%s" % shell)
if type(command) is list:
shell = util.path_lookup(command[0])
args = command
else:
args.insert(0, shell)
shell = util.shell_lookup()
if command is not None:
args += ['-c', command]
if self.config['login_shell']:
args.insert(0, "-%s" % shell)
else:
args.insert(0, shell)
if command is not None:
args += ['-c', command]
if shell is None:
self.vte.feed(_('Unable to find a shell'))
@ -970,6 +981,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
except AttributeError:
pass
dbg('Forking shell: "%s" with args: %s' % (shell, args))
self.pid = self.vte.fork_command(command=shell, argv=args, envv=[],
loglastlog=login, logwtmp=update_records,
logutmp=update_records, directory=self.cwd)

View File

@ -101,7 +101,7 @@ def path_lookup(command):
dbg('path_lookup: PATH not set in environment, using fallbacks')
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:
target = os.path.join(path, command)