Revert previous changes, easier to just include infocmp and terminfo

git-svn-id: file:///home/svn/framework3/trunk@7092 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-09-29 03:42:26 +00:00
parent 7b28cdacd8
commit 3500745d70
1 changed files with 1 additions and 4 deletions

View File

@ -1822,10 +1822,7 @@ module RbReadline
def get_term_capabilities(buffer)
hash = {}
buff = IO.popen('infocmp -C 2>/dev/null').read
if(buff and not buff.empty? and buff !~ /couldn't open terminfo/)
buff.split(':').select{|x| x =~ /(.*)=(.*)/ and hash[$1]=$2.gsub('\\E',"\e").gsub(/\^(.)/){($1[0].ord ^ ((?a..?z).include?($1[0]) ? 0x60 : 0x40)).chr}}
end
`infocmp -C`.split(':').select{|x| x =~ /(.*)=(.*)/ and hash[$1]=$2.gsub('\\E',"\e").gsub(/\^(.)/){($1[0].ord ^ ((?a..?z).include?($1[0]) ? 0x60 : 0x40)).chr}}
@_rl_term_at7 = hash["@7"]
@_rl_term_DC = hash["DC"]
@_rl_term_IC = hash["IC"]