private function countTermCols():int
    {
        if (!$this->termCols) {
            if (!($this->termCols = (int)exec('tput cols'))) {
                $this->termCols = 80;
            }
        }
        return $this->termCols;
    }