history-substring-search: bindkey now checks if terminfo is available first.