Fix usage message

This commit is contained in:
Augusto Gunsch 2022-11-11 23:09:45 +01:00
parent 8818b0ddcd
commit 6220caecce
No known key found for this signature in database
GPG Key ID: F7EEFE29825C72DC
3 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,7 @@ Substitute every match of a regex in multiple files - with confirmation prompts.
``` ```
subprompt [REGEX] [SUB] [FILES...] subprompt [REGEX] [SUB] [FILES...]
``` ```
Install through PyPi: Install it through PyPi:
``` ```
python3.9 -m pip install subprompt python3.9 -m pip install subprompt
``` ```

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = subprompt name = subprompt
version = 0.0.3 version = 0.0.4
author = Augusto Lenz Gunsch author = Augusto Lenz Gunsch
author_email = augusto@augustogunsch.com author_email = augusto@augustogunsch.com
description = Substitute Regex in files with prompt confirmation description = Substitute Regex in files with prompt confirmation

View File

@ -26,7 +26,6 @@ import re
import hashlib import hashlib
import os import os
from sys import argv, stderr from sys import argv, stderr
from os.path import basename
from colorama import init, Fore, Back, Style from colorama import init, Fore, Back, Style
init(autoreset=True) init(autoreset=True)
@ -124,7 +123,7 @@ class Filter:
def run(args): def run(args):
if len(args) < 3: if len(args) < 3:
print('usage: {0} [REGEX] [SUB] [FILES...]'.format(basename(__file__)), file=stderr) print('usage: subprompt [REGEX] [SUB] [FILES...]', file=stderr)
exit(1) exit(1)
regex = args[0] regex = args[0]