diff --git a/terminatorlib/optionparse.py b/terminatorlib/optionparse.py index 19c759a3..09a67eab 100755 --- a/terminatorlib/optionparse.py +++ b/terminatorlib/optionparse.py @@ -108,7 +108,7 @@ WM_WINDOW_ROLE property on the window') else: err('OptionParse::parse_options: %s does not exist' % options.working_directory) - sys.exit(1) + options.working_directory = '' if options.layout is None: options.layout = 'default' diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 97da9b35..abac61bf 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1061,6 +1061,11 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) details[1])) command = 'telnet %s %s' % (details[0], details[1]) + if options and options.working_directory and \ + options.working_directory != '': + self.set_cwd(options.working_directory) + options.working_directory = '' + if type(command) is list: shell = util.path_lookup(command[0]) args = command