Add --all and cleanup clear_line().
[python_utils.git] / ansi.py
diff --git a/ansi.py b/ansi.py
index a8b84fc0c2dd0acce18e96d21d86eb2b2da409b7..628fed7144442cd5b7d13b7d136ac0fc66532d7f 100755 (executable)
--- a/ansi.py
+++ b/ansi.py
@@ -1619,6 +1619,11 @@ def clear_screen() -> str:
     return "\e[H\e[2J"
 
 
+def clear_line() -> str:
+    """Clear the current line ANSI escape sequence"""
+    return "\e[2K\r"
+
+
 def reset() -> str:
     """Reset text attributes to 'normal'"""
     return "\e[m"