ansi-utils/ansimove.py

26 lines
1.2 KiB
Python

# Please don't try to understand this mess, it's not worth it.
# Colors:
# Headlines - 178 & Bold
# \033 - 122
# <line> - 125 & Bold
# <col> - 166
# <N> - 161 & Bold
# Other words - 201
print("\033[1m\033[38;5;178mPosition the cursor:\033[0m")
print("\t\t\033[38;5;122m\\033[\033[38;5;125m\033[1m<line>\033[0m\033[38;5;122m;\033[38;5;166m\033[1m<col>\033[0m\033[38;5;122mH\033[0m")
print("\t\t\t\033[38;5;201mOr")
print("\t\t\033[38;5;122m\\033[\033[38;5;125m\033[1m<line>\033[0m\033[38;5;122m;\033[38;5;166m\033[1m<col>\033[0m\033[38;5;122mf\033[0m")
print("\033[1m\033[38;5;178mMoving the cursor:\033[0m")
print(" \033[38;5;201mUp:\t\t\033[38;5;122m\\033[\033[38;5;161m\033[1m<N>\033[0m\033[38;5;122mA")
print(" \033[38;5;201mDown:\t\033[38;5;122m\\033[\033[38;5;161m\033[1m<N>\033[0m\033[38;5;122mB")
print(" \033[38;5;201mRight:\t\033[38;5;122m\\033[\033[38;5;161m\033[1m<N>\033[0m\033[38;5;122mC")
print(" \033[38;5;201mLeft:\t\033[38;5;122m\\033[\033[38;5;161m\033[1m<N>\033[0m\033[38;5;122mD")
print("\033[1m\033[38;5;178mClear the screen, move cursor to (0,0):")
print("\t\t\033[38;5;122m\\033[2J")
print("\033[1m\033[38;5;178mErase to end of line")
print("\t\t\033[38;5;122m\\033[K")