yoda icon indicating copy to clipboard operation
yoda copied to clipboard

dependency not mentioned: tput (ncurses-utils)

Open eekee opened this issue 2 months ago • 2 comments

starting yoda for the first time, it gave a lot of messages, "tput: command not found". line numbers were 656, 657, 497 more than 10 times, then i saw "yoda shell" and "ok", then the error again on lines 498 & 500, then a line beginning "flags:fs" and the error once more on the end, for line 507.

this is termux which has debian-based package system. It tells me tmux is provided by ncurses-utils.

(I wish Debian didn't split pakages up so much, but here we are.)

Would these errors have affected library building? Do I need to do anything to clean it up?

eekee avatar Oct 17 '25 10:10 eekee

tput is used for displaying a status line at top of screen (in addition to words using it, like cursor positioning). The top line status display is enabled by default. Also, the default loaded prompt uses tput for colour changes.

Turning both off may solve the problem. That's done by editing the file "defaults". Change the top line, which says:

needs: newprompt newquery$

Comment it out, or remove it completely. Replace it against

' simpleprompt is prompt

Both can be done from and within an already running yoda: To turn off status line, execute -L . To change prompt, execute the same as you'd enter into defaults:

' simpleprompt is prompt

Building the list of dependencies isn't affected. This is a cosmetic issue only.

Another use of tput is slightly more complex to fix: I made the mistake of using tput in the source code of yoda, for highlighting errors. two variables are assigned to the terminal control codes for setting background to red, and returning to normal. Those variables are found on these lines:

read -r redbg < <(tput setab 1) read -r normal < <(tput sgr0)

setting them to empty string instead, or to brackets around error word, should help here. As in:

redbg=" >>> " normal=" <<< "

Bushmills avatar Oct 17 '25 11:10 Bushmills

Wow! Good to know it's only cosmetic. Thanks for all the info, that's pretty cool.

eekee avatar Oct 17 '25 18:10 eekee