Skip to content

Commit

Permalink
- [bug 678] fix argument handling of the --execute flag
Browse files Browse the repository at this point in the history
- [bug 939] execute still broken
- [bug 923] terminator -x gets confused by

- fixed double dash -- by handling extra arguements, need to cross check against all use cases
- currently its done in terminal.py need to check if other dependencies but first I want to get
- the behavior right
  • Loading branch information
vssdeo committed Dec 8, 2024
1 parent fa89055 commit 04508df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terminatorlib/optionparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def parse_options():
help=argparse.SUPPRESS)

global options
options = parser.parse_args()
options, extra = parser.parse_known_args()

if options.version:
print('%s %s' % (version.APP_NAME, version.APP_VERSION))
Expand Down Expand Up @@ -175,4 +175,5 @@ def parse_options():
if util.DEBUG == True:
dbg('command line options: %s' % options)

options.extra = extra
return(options,optionslist)
6 changes: 6 additions & 0 deletions terminatorlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,12 @@ def spawn_child(self, widget=None, respawn=False, debugserver=False, init_comman
options.command = None
elif options and options.execute:
command = options.execute
dbg('cmd: %s' % command)
if len(options.extra) and options.extra[0] == '--':
options.execute.extend(options.extra[1:])
command = options.execute
dbg('cmd with extra args: %s' % command)

self.relaunch_command = command
options.execute = None
elif self.relaunch_command:
Expand Down

0 comments on commit 04508df

Please sign in to comment.