JEG2/highline — Issue #22: echo=false with jruby clears terminal
Author: tomdz
Created: 2011-11-23 20:17:51+00:00
State: open

When using highline under jruby (with ffi-ncurses) on Linux I get this weird behavior that highline clears the terminal before allowing me to enter characters in echo=false mode:

#!/usr/bin/env ruby
require 'rubygems'
require 'highline/import'

ask("Username ?\n")
ask("Password ?\n") { |q| q.echo = false }

The environment is:

$ ruby -v
jruby 1.6.4 (ruby-1.8.7-p330) (2011-08-23 17ea768) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26) [linux-amd64-java]

$ gem list

*** LOCAL GEMS ***

ffi (1.0.9 java)
ffi-locale (1.0.1)
ffi-ncurses (0.4.0)
highline (1.6.8)

HighLine::SystemExtensions::CHARACTER_MODE is 'ncurses'.