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
Managor c0df7e9877
tput: add examples (#15638)
Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
2025-02-09 09:20:05 +02:00

36 lines
674 B
Markdown

# tput
> View and modify terminal settings and capabilities.
> More information: <https://manned.org/tput>.
- Move the cursor to a screen location:
`tput cup {{row}} {{column}}`
- Set foreground (af) or background (ab) color:
`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}}`
- 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}}`