#!/bin/zsh _DEPENDENCIES+=( tic ) _REQUIRED_ENV+=() source ${0:a:h}/common.zsh ##################################################################### SETUP_TERMINFO() { [ ! $TERMINFO_PATH ] && return 0 [ ! -d $TERMINFO_PATH ] && __FAIL 1 "TERMINFO_PATH='$TERMINFO_PATH' does not exist" local ERRORS=0 for TERMINFO in $(find $TERMINFO_PATH -type f) do tic -x $TERMINFO >/dev/null 2>&1 \ && __SUCCESS "added '$(basename $TERMINFO)'" \ || __ERROR "failed to add '$(basename $TERMINFO)'" \ ; done __ERROR_CHECK } ##################################################################### SETUP_TERMINFO $@