Replace 'resize' with 'tput cols' to fetch the width of terminal, because some system doesn't distributed with 'resize'.