mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Updated for split options
This commit is contained in:
parent
dd22cfb0f1
commit
5832be34ab
1 changed files with 2 additions and 3 deletions
|
@ -229,9 +229,7 @@ class Argparse(Configs):
|
|||
def split_options(self):
|
||||
""" Split options and commands, like: -iyjR """
|
||||
for args in self.args:
|
||||
if (args[0] == '-' and args[:2] != '--' and len(args) >= 3 and
|
||||
not args.startswith((self.flag_short_file_pattern,
|
||||
self.flag_short_directory))):
|
||||
if args[0] == '-' and args[:2] != '--' and len(args) >= 3 and '=' not in args:
|
||||
self.args.remove(args)
|
||||
|
||||
for opt in list(map(lambda item: f'-{item}', [arg for arg in list(args[1:])])):
|
||||
|
@ -240,6 +238,7 @@ class Argparse(Configs):
|
|||
continue
|
||||
|
||||
self.args.append(opt)
|
||||
print(self.args)
|
||||
|
||||
def split_options_from_args(self):
|
||||
""" Split options from arguments. """
|
||||
|
|
Loading…
Reference in a new issue