Fixed argument parser bug
Signed-off-by: Rémi BERTHO <remi.bertho@dalan.fr>
This commit is contained in:
parent
da4a6a7828
commit
dd5d3e8f43
1 changed files with 2 additions and 2 deletions
4
SSnR.py
4
SSnR.py
|
@ -35,7 +35,7 @@ def main():
|
||||||
"""
|
"""
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
parser = argparse.ArgumentParser(description='Search and replace tool for UTF-8 files',
|
parser = argparse.ArgumentParser(description='Search and replace tool for UTF-8 files',
|
||||||
prog='SSnR')
|
prog='SSnR', allow_abbrev=False)
|
||||||
|
|
||||||
regex_group = parser.add_argument_group('Regular expression', "Search and replace regular expression")
|
regex_group = parser.add_argument_group('Regular expression', "Search and replace regular expression")
|
||||||
regex_group.add_argument('-ex', '--regex', help='Regex', required=True)
|
regex_group.add_argument('-ex', '--regex', help='Regex', required=True)
|
||||||
|
@ -59,7 +59,7 @@ def main():
|
||||||
required=False, action='store_true')
|
required=False, action='store_true')
|
||||||
option_group.add_argument('-igc', '--ignore_case', help='Ignore the case',
|
option_group.add_argument('-igc', '--ignore_case', help='Ignore the case',
|
||||||
required=False, action='store_true')
|
required=False, action='store_true')
|
||||||
option_group.add_argument('-r', '--recursive', help='Use the regex input recrusivly in the folders',
|
option_group.add_argument('-r', '--recursive', help='Use the regex input recursivly in the folders',
|
||||||
required=False, action='store_true')
|
required=False, action='store_true')
|
||||||
|
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
|
|
Loading…
Reference in a new issue