Copyright (C) 2000-2012 |
Whole document tree
6.4. Colours and Cursor Movement With tputAs with so many things in Unix, there is more than one way to achieve the same ends. A utility called tput can also be used to move the cursor around the screen, get back information about the status of the terminal, or set colours. man tput doesn't go into much detail about the available commands, but Emilio Lopes e-mailed me to point out that man terminfo will give you a huge list of capabilities, many of which are device independent, and therefore better than the escape sequences previously mentioned. He suggested that I rewrite all the examples using tput for this reason. He is correct that I should, but I've had some trouble controlling it and getting it to do everything I want it to. However, I did rewrite one prompt which you can see as an example: Section 12.8. Here is a list of tput capabilities that I have found useful: tput Colour Capabilities
tput Text Mode Capabilities
tput Cursor Movement Capabilities
tput Clear and Insert Capabilities
This is by no means a complete list of what terminfo and tput allow, in fact it's only the beginning. man tput and man terminfo if you want to know more. |