aboutsummaryrefslogtreecommitdiff
path: root/lib/term.lisp
blob: c5b472ae61baea769363d3b3624707971fca0891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;;;; term.lisp -- functions for dealing with the terminal



(in-package :oneliners.cli.term)

(defvar *term-width* nil)

(defun set-term-width ()
  ;; tput cols b/c getenv COLUMNS wasnt working on some terminals
  (setf *term-width*
        (- 
         (or (parse-integer (uiop:run-program '("tput" "cols") :output :string) :junk-allowed t)
             80)
         4)))