diff --git a/gptcli/cli.py b/gptcli/cli.py index cd591d4..1d60a04 100644 --- a/gptcli/cli.py +++ b/gptcli/cli.py @@ -144,6 +144,14 @@ def replacer(match): for i, (part, delimiter) in enumerate(extracted_parts): input = input.replace(f"__EXTRACTED_PART_{i}__", f"{delimiter}{part.strip()}{delimiter}") +# def parse_args(input: str, parse_args = False) -> Tuple[str, Dict[str, Any]]: +# args = {} +# if parse_args: +# regex = r"--(\w+)(?:\s+|=)([^\s]+)" +# matches = re.findall(regex, input) +# if matches: +# args = dict(matches) +# input = input.split("--")[0].strip() return input, args