RAA - ruby-terminfo

ruby-terminfo / 0.2

Short description: terminfo binding for Ruby
Category: Library/Term
Status: usable
Created: 2007-04-10 11:06:08 GMT
Last update: 2009-03-06 07:46:04 GMT
Owner: Tanaka Akira (Projects of this owner)
Homepage: http://www.a-k-r.org/ruby-terminfo/
Download: http://www.a-k-r.org/ruby-terminfo/
License: BSD-type
Dependency:
None
Description:

terminfo binding for Ruby

  • easy to use method, control, for combination of tigetstr/tparm/tputs.
  • low-level terminfo binding (setupterm, tigetflag, tigetnum, tigetstr, tparm, tputs)
  • TIOCGWINSZ/TIOCSWINSZ ioctl for screen size
  • wcswidth for string width in number of columns

Simple Usage:

require 'terminfo'
TermInfo.control("cuf", 7)    # cursor forward 7 columns
p TermInfo.screen_size        # use TIOCGWINSZ, LINES/COLUMNS env. or terminfo lines#/cols#
Versions: [0.2 (2009-03-06)] [0.1 (2007-04-10)]

Edit this project (for project owner)

back to RAA top