1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/tput.md

37 lines
674 B
Markdown
Raw Normal View History

2016-02-22 19:31:30 -05:00
# tput
> View and modify terminal settings and capabilities.
> More information: <https://manned.org/tput>.
2016-02-22 19:31:30 -05:00
- Move the cursor to a screen location:
2022-11-16 17:08:31 +03:00
`tput cup {{row}} {{column}}`
2016-02-22 19:31:30 -05:00
- Set foreground (af) or background (ab) color:
`tput {{setaf|setab}} {{ansi_color_code}}`
- Reverse text and background colors:
2016-02-22 19:31:30 -05:00
`tput rev`
2016-02-22 19:31:30 -05:00
- Reset all terminal text attributes:
2016-02-22 19:31:30 -05:00
`tput sgr0`
2016-02-22 19:31:30 -05:00
- Show number of columns, lines, or colors:
2016-02-22 19:31:30 -05:00
`tput {{cols|lines|colors}}`
2017-04-15 07:29:28 -04:00
2022-12-06 16:48:59 +10:00
- Enable or disable word wrap:
2017-04-15 07:29:28 -04:00
`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}}`