Merge x-terminal-emulator option fix from Neal Fultz. Closes LP#366644
This commit is contained in:
commit
144dd8ff14
|
@ -42,6 +42,8 @@ def parse_options():
|
||||||
"""Parse the command line options"""
|
"""Parse the command line options"""
|
||||||
usage = "usage: %prog [options]"
|
usage = "usage: %prog [options]"
|
||||||
|
|
||||||
|
is_x_terminal_emulator = os.path.basename(sys.argv[0]) == 'x-terminal-emulator'
|
||||||
|
|
||||||
parser = OptionParser(usage)
|
parser = OptionParser(usage)
|
||||||
|
|
||||||
parser.add_option('-v', '--version', action='store_true', dest='version',
|
parser.add_option('-v', '--version', action='store_true', dest='version',
|
||||||
|
@ -59,8 +61,16 @@ def parse_options():
|
||||||
parser.add_option('--geometry', dest='geometry', type='string',
|
parser.add_option('--geometry', dest='geometry', type='string',
|
||||||
help=_('Set the preferred size and position of the window'
|
help=_('Set the preferred size and position of the window'
|
||||||
'(see X man page)'))
|
'(see X man page)'))
|
||||||
|
if not is_x_terminal_emulator:
|
||||||
parser.add_option('-e', '--command', dest='command',
|
parser.add_option('-e', '--command', dest='command',
|
||||||
help=_('Specify a command to execute inside the terminal'))
|
help=_('Specify a command to execute inside the terminal'))
|
||||||
|
else:
|
||||||
|
parser.add_option('--command', dest='command',
|
||||||
|
help=_('Specify a command to execute inside the terminal'))
|
||||||
|
parser.add_option('-e', '--execute2', dest='execute', action='callback',
|
||||||
|
callback=execute_cb,
|
||||||
|
help=_('Use the rest of the command line as a command to '
|
||||||
|
'execute inside the terminal, and its arguments'))
|
||||||
parser.add_option('-g', '--config', dest='config',
|
parser.add_option('-g', '--config', dest='config',
|
||||||
help=_('Specify a config file'))
|
help=_('Specify a config file'))
|
||||||
parser.add_option('-x', '--execute', dest='execute', action='callback',
|
parser.add_option('-x', '--execute', dest='execute', action='callback',
|
||||||
|
|
Loading…
Reference in New Issue