From c0df7e9877ed405f3aaeb17fec6eef1b630c348d Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sun, 9 Feb 2025 09:20:05 +0200 Subject: [PATCH] tput: add examples (#15638) Co-authored-by: Juri Dispan --- pages/common/tput.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pages/common/tput.md b/pages/common/tput.md index 0d46fabcd7..8f1be26f3a 100644 --- a/pages/common/tput.md +++ b/pages/common/tput.md @@ -11,18 +11,26 @@ `tput {{setaf|setab}} {{ansi_color_code}}` +- Reverse text and background colors: + +`tput rev` + +- Reset all terminal text attributes: + +`tput sgr0` + - Show number of columns, lines, or colors: `tput {{cols|lines|colors}}` -- Ring the terminal bell: - -`tput bel` - -- Reset all terminal attributes: - -`tput sgr0` - - Enable or disable word wrap: `tput {{smam|rmam}}` + +- Hide or show the terminal cursor: + +`tput {{civis|cnorm}}` + +- Save or restore terminal text status (smcup also captures scroll wheel events): + +`tput {{smcup|rmcup}}`