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:
@@ -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 + "}"
|
||||
|
||||
Reference in New Issue
Block a user