Mercurial > core / lisp/lib/cli/pkg.lisp
changeset 129: |
80a56483f9b5 |
parent: |
d0b235557fab
|
child: |
193d1ea7d684 |
author: |
ellis <ellis@rwest.io> |
date: |
Tue, 26 Dec 2023 23:44:35 -0500 |
permissions: |
-rw-r--r-- |
description: |
more organ work |
1 ;;; cli.lisp --- cli programming api and utils 3 ;; This package contains a simple api and macros for building lisp CLI 8 ;; - inspired by: clingon, uiop 10 ;; Basic assumptions at runtime: 11 ;; - running in a POSIX-compliant shell 12 ;; - output stream supports UTF-8 14 ;; TODO 2023-10-14: install-ast, install-thunk, proc-args, etc should 15 ;; return IR types - CLI-IR THUNK and CLI-IR respectively. 17 ;; TODO 2023-10-14: rename cli-ast to cli-ir, install-ast to 21 (uiop:define-package :cli 22 (:use :cl :std :log :sb-ext) 23 (:import-from :uiop :println) 24 (:import-from :sb-ext :parse-native-namestring) 25 (:shadowing-import-from :sb-ext :exit) 32 :*cli-group-separator* 80 :handle-unknown-argument 81 :handle-missing-argument 82 :handle-invalid-argument 111 (defpackage :cli/ansi 117 :ris :reset-to-initial-state 123 :cub :cursor-backward 124 :cnl :cursor-next-line 125 :cpl :cursor-preceding-line 126 :cha :cursor-horizontal-absolute 127 :cup :cursor-position 128 :vpa :vertical-position-absolute 129 :vpr :vertical-position-relative 130 :vpb :vertical-position-backward 131 :scosc :save-cursor-position 132 :scorc :restore-cursor-position 133 :ed :erase-in-display :erase-below :erase-above :erase :erase-saved-lines 134 :el :erase-in-line :erase-right :erase-left :erase-line 135 :sgr :select-graphic-rendition 136 :dsr :device-status-report 137 ;; DEC private mode set and reset 138 :decset :dec-private-mode-set 139 :decrst :dec-private-mode-reset 140 :show-cursor :hide-cursor 141 :use-alternate-screen-buffer :use-normal-screen-buffer 148 (defpackage :cli/prompt 154 (defpackage :cli/progress 160 :*progress-bar-enabled* 161 :start-progress-display 162 :finish-progress-display 164 :uncertain-size-progress-bar 167 (defpackage :cli/spark 173 (defpackage :cli/repl 174 (:use :cl :std :cli :cli/progress :cli/spark) 178 (:use :cl :std :cli))