Merge term and terminfo.