From 7fe3cb1fa90aeee775ea0ee6e8f1a0396e9b8325 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 30 Jan 2022 00:51:24 -0600 Subject: [PATCH] Move ANSI escape cheat sheet to tty.c --- lib/tty.c | 5 +++++ toys/other/hexedit.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tty.c b/lib/tty.c index b4aee45e..c09413b5 100644 --- a/lib/tty.c +++ b/lib/tty.c @@ -1,6 +1,11 @@ /* tty.c - cursor control * * Copyright 2015 Rob Landley + * + * Common ANSI (See https://man7.org/linux/man-pages/man4/console_codes.4.html) + * \e[#m - color change \e[y;xH - jump to x/y pos (1;1 is top left) + * \e[K - delete to EOL \e[25l - disable cursor (h to enable) + * \e[1L - Insert 1 (blank) line \e[1M - Delete 1 line (scrolling rest up) */ #include "toys.h" diff --git a/toys/other/hexedit.c b/toys/other/hexedit.c index bf1c7a6a..d3402056 100644 --- a/toys/other/hexedit.c +++ b/toys/other/hexedit.c @@ -3,11 +3,6 @@ * Copyright 2015 Rob Landley * * No standard. - * - * See https://man7.org/linux/man-pages/man4/console_codes.4.html - * \e[#m - color change \e[y,xH - jump to x/y pos (1-based) - * \e[K - delete to EOL \e[25l - disable cursor (h to enable) - * \e[1L - zap line after cursor \e[1M - zap line before cursor USE_HEXEDIT(NEWTOY(hexedit, "<1>1r", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE)) -- 2.39.2