crystallabs / tput.cr

Low-level component for building term/console applications in Crystal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiling example fails

lebogan opened this issue · comments

Crystal 1.0.0 [dd40a2442] (2021-03-22)

LLVM: 10.0.0
Default target: x86_64-unknown-linux-gnu
shard.yml

  tput:
    github: crystallabs/tput.cr
    branch: master
/usr/bin/crystal  build src/pager.cr -o bin/pager --warnings all --error-on-warnings
    152 | tput.set_title "Test 123"
Error: undefined method 'set_title' for Tput

Thanks for any help.

Heya, I will check shortly and report back, thanks!

Looks like this one is simple, Tput#set_title is now Tput#title=. Examples and README have been updated accordingly.

Two more notes:

  1. The examples mostly don't reset terminal state after exit. To solve this in the examples or in your own code, just use something like:
at_exit {
  @tput.input.cooked!
}
  1. For an app using large portions of tput, see https://github.com/crystallabs/crysterm

Going to close this issue now. Feel free to reopen or open new tickets in case of further issues. Thanks!