replace '\f' in --print arguments with form feed character

to make it easier to use special type format strings on command-line
(#6938)
This commit is contained in:
Mike Fährmann
2025-02-07 19:37:33 +01:00
parent 28385bec7a
commit e2134b349d

View File

@@ -179,7 +179,9 @@ class PrintAction(argparse.Action):
if not format_string:
return
if "{" not in format_string and \
if format_string.startswith("\\f"):
format_string = "\f" + format_string[2:]
elif "{" not in format_string and \
" " not in format_string and \
format_string[0] != "\f":
format_string = "{" + format_string + "}"