--- a/src/eric7/UI/UserInterface.py Thu Nov 09 11:23:48 2023 +0100 +++ b/src/eric7/UI/UserInterface.py Thu Nov 09 14:27:21 2023 +0100 @@ -1633,12 +1633,13 @@ opens = 0 - # holds space delimited list of command args, if any - argsStr = None - # flag indicating '--' options was found - ddseen = False - - argChars = ["-", "/"] if OSUtilities.isWindowsPlatform() else ["-"] + if "--" in args: + # store args after a '--' as a space delimited list of command args, if any + ddindex = args.index("--") + argsStr = " ".join(args[ddindex + 1:]) + args = args[:ddindex] + else: + argsStr = None for arg in args: # handle a request to start with last session @@ -1659,20 +1660,8 @@ # ignore all further arguments return - if arg == "--" and not ddseen: - ddseen = True - continue - - if arg[0] in argChars or ddseen: - if argsStr is None: - argsStr = arg - else: - argsStr = "{0} {1}".format(argsStr, arg) - continue - try: - ext = os.path.splitext(arg)[1] - ext = os.path.normcase(ext) + ext = os.path.normcase(os.path.splitext(arg)[1]) except IndexError: ext = ""