diff --git a/.gitignore b/.gitignore index 4935bf9..eba97f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ venv/ *.egg-info/ __pycache__/ -*.test_*.srt dist/ diff --git a/README.md b/README.md index 06c4580..c71d38b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ python3.9 -m pip install subprompt ## Usage ``` -usage: subprompt.py [-h] (-d | -r R) [-n N] REGEX FILES [FILES ...] +usage: subprompt [-h] (-d | -r SUB) [-n N] REGEX FILES [FILES ...] Modifies lines matched by a regex interactively @@ -20,6 +20,6 @@ positional arguments: optional arguments: -h, --help show this help message and exit -d delete line - -r R replace match with expression + -r SUB replace match with expression -n N size of lines preview (default=3) ``` diff --git a/setup.cfg b/setup.cfg index 13f420a..1747c65 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = subprompt -version = 0.0.7 +version = 0.0.9 author = Augusto Lenz Gunsch author_email = augusto@augustogunsch.com description = Substitute Regex in files with prompt confirmation diff --git a/src/subprompt/subprompt.py b/src/subprompt/subprompt.py index 6df16ae..36ef2e2 100644 --- a/src/subprompt/subprompt.py +++ b/src/subprompt/subprompt.py @@ -166,7 +166,7 @@ def run(args): parser.add_argument('regex', metavar='REGEX', type=str) action = parser.add_mutually_exclusive_group(required=True) action.add_argument('-d', help='delete line', action='store_true') - action.add_argument('-r', help='replace match with expression', type=str) + action.add_argument('-r', help='replace match with expression', type=str, metavar='SUB') parser.add_argument('files', metavar='FILES', nargs='+', type=str) parser.add_argument('-n', help='size of lines preview (default=3)', type=int, default=3)