The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
0answers
39 views

Portable color codes with printf? [duplicate]

There is a color codes script on GitHub suitable for sourcing, which I am modifying for my own purposes. Background I have an odd mix of environments to work in, from a Mac OS terminal, to various ...
5
votes
3answers
86 views

Is there any objective benefit to escape sequences over tput?

In people's '.*rc' files I see online or in various code, I tend to see a lot of people who manually use ANSI escape sequences instead of using tput. I had the understanding that tput is more ...
4
votes
3answers
741 views

tput setaf color table? How to determine color codes?

I am in the process of colorizing my terminal’s PS1. I am setting color variables using tput; for example, here’s purple: PURPLE=$(tput setaf 125) Question: How do I find the color codes (e.g. ...
3
votes
1answer
47 views

How can I print a variable with padded center alignment?

How can I print $myvar padded so that it is in the center of the terminal, and to either side are = to the edge of the screen?
3
votes
2answers
207 views

Outputting a string in the bottom right corner of the terminal

How do I output a string in the bottom right corner of the terminal?
0
votes
1answer
134 views

Colorization of BASH script output with tput - how to select good colors?

I would like to colorize output of one long complex interactive BASH script to make it easier for the user to work with it. I have learned how to use tput, but my question is more matter of design: ...
7
votes
1answer
202 views

Full list of tput options

I wanted to hide the cursor, and I was aware of tput command. I did search its man page. On searching the Internet, I found $ tput civis # to hide the cursor $ tput cnorm # to bring back the cursor ...
0
votes
1answer
51 views

Hide and unhide cursor with tput

tput civis successfully hides the cursor. tput cvvis should unhide it, but it doesn't. Any idea what the problem might be?
2
votes
1answer
935 views

tput: No value for $TERM and no -T specified

I am trying to run a bash script I have via cron, and I am getting the following error at the beginning of the execution: tput: No value for $TERM and no -T specified Here is what is in my crontab: ...
0
votes
2answers
280 views

help with bash scripting tput getting errors [closed]

I am a beginner to bash scripting. I need help to figure out what is wrong with this tput menu. #!/bin/bash tput setb 3 tput clear function main_menu { option=0 until [ "$option" = "4" ]; do echo "...
2
votes
1answer
126 views

tput command + how to locate dialog window on the top of the screen

Is it possible to use the tput command in order to place the dialog window on the top of the screen ? For example The following dialog command display the log is running by tail command dialog -...
11
votes
3answers
4k views

What is the difference between tput's 'setf' and 'setaf'?

The command tput has two different options for setting color, setf and setaf, yet both of them seem to work just fine on my computer: $ tput setf 2 && echo 'Hello world!' $ tput setaf 2 &&...
3
votes
1answer
215 views

Cursor movement related tput commands under zsh: can the 'clear' behavior be configured?

Using the zsh shell, I've noticed a difference in the behavior of the tput command compared to bash. For instance With zsh, if you have many things output to a terminal emulator window and you're at ...
4
votes
2answers
2k views

bash script , echo output in box

I have created this Function , which generate below output on terminal , but this function seems complex, So I posted here for any improvement or for same alternate solution. #!/bin/bash function ...
1
vote
2answers
605 views

screen buffer and dialog

I was trying to use different screen buffer for my script using tput. Below is small script that I am running. tput smcup clear dialog --yesno "Do you want to continue?" 0 0 rc=$? clear tput rmcup if ...
3
votes
1answer
166 views

How to use the Meta/Alt Key with tput?

I want to redefine keybindings for the commandline of a lisp dialect. The commandline is actually modeled after Vi and implemented with tput/terminfo. I want an alternative version with Emacs ...
3
votes
2answers
557 views

Print console colors

Wrote a bash function to display the console colors. But, it seems some of the colors are not possible to show that way! (?) Also, note the strange "bright black"! (Note: The below screendump is of ...