diff --git a/lib/rbreadline.rb b/lib/rbreadline.rb index 2231c81306..b96cee5c79 100644 --- a/lib/rbreadline.rb +++ b/lib/rbreadline.rb @@ -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"]