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"""
|
||||
usage = "usage: %prog [options]"
|
||||
|
||||
is_x_terminal_emulator = os.path.basename(sys.argv[0]) == 'x-terminal-emulator'
|
||||
|
||||
parser = OptionParser(usage)
|
||||
|
||||
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',
|
||||
help=_('Set the preferred size and position of the window'
|
||||
'(see X man page)'))
|
||||
parser.add_option('-e', '--command', dest='command',
|
||||
help=_('Specify a command to execute inside the terminal'))
|
||||
if not is_x_terminal_emulator:
|
||||
parser.add_option('-e', '--command', dest='command',
|
||||
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',
|
||||
help=_('Specify a config file'))
|
||||
parser.add_option('-x', '--execute', dest='execute', action='callback',
|
||||
|
|
Loading…
Reference in New Issue