This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
package.lisp
184 lines (180 loc) · 6.25 KB
/
package.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
;;;
;;; package.lisp - Package definition for Lish
;;;
(defpackage :lish
(:documentation
"Lish is both a command shell and a Lisp REPL.
Lish is designed to make typing both operating system commands and Common Lisp
expressions convienient. It combines the features of a traditional operating
system shell with a Lisp REPL. It's designed to hopefully have little annoyance
to people familair with a POSIX shell. But it does not have exact compatibility
with POSIX shells.
The motivation for writing Lish came from the annoyance of having to swtich
between a Lisp REPL and a Unix shell. Lish may be used as a command shell,
without any particular knowledge of it's Lisp programming features.")
(:use :cl :dlib :opsys :dlib-misc :stretchy :char-util :glob
:table :table-print :reader-ext :completion :keymap
:terminal :terminal-ansi :rl :fatchar :fatchar-io :collections
:ostring :ochar :grout :dtime :string-expand
#+use-regex :regex #-use-regex :cl-ppcre)
;; #+sbcl (:import-from :sb-ext #:retry)
(:export
;; Main entry point(s)
#:lish
#:shell-toplevel
;; variables
#:*lish-level*
#:*lish-user-package*
#:*shell-name*
#:*shell*
#:*old-pwd*
#:*dir-list*
#:*accepts*
#:*output* #:output #:*o*
#:*input* #:input #:*i*
#:with-output #:with-input
#:*lishrc*
#:*use-bracketed-paste*
#:*version*
#:*major-version* #:*minor-version* #:*build-version*
;; hooks @@@ maybe should be made into options?
#:*pre-command-hook*
#:*post-command-hook*
#:*unknown-command-hook*
#:*enter-shell-hook*
#:*exit-shell-hook*
;; installation
#:make-standalone
#:make-standalone-command
;; shell options
#:option
;; @@@ maybe we don't really need to export all this junk
#:lish-prompt #:set-lish-prompt
#:lish-prompt-function #:set-lish-prompt-function
#:lish-right-prompt #:set-lish-right-prompt
#:lish-sub-prompt #:set-lish-sub-prompt
#:lish-ignore-eof #:set-lish-ignore-eof
#:lish-debug #:set-lish-debug
#:lish-collect-stats #:set-lish-collect-stats
#:lish-autoload-from-asdf #:set-lish-autoload-from-asdf
#:lish-autoload-quietly #:set-lish-autoload-quietly
#:lish-history-expansion #:set-lish-history-expansion
#:lish-expand-braces #:set-lish-expand-braces
#:lish-colorize #:set-lish-colorize
#:lish-auto-cd #:set-lish-auto-cd
#:lish-history-style #:set-lish-history-style
#:lish-history-format #:set-lish-history-format
;; #:lish-history-save-values #:set-lish-history-save-values
#:lish-auto-suggest #:set-lish-auto-suggest
#:lish-partial-line-indicator #:set-lish-partial-line-indicator
#:lish-export-pipe-results #:set-lish-export-pipe-results
#:make-prompt
;; shell object
#:shell
#:shell-interactive-p
#:shell-aliases
#:lish-editor
#:lish-keymap
#:lish-old-pwd
#:lish-dir-list
#:lish-suspended-jobs
#:lish-last-background-job
#:lish-start-time
#:shell-help-table
#:lish-options
;; arguments
#:argument
#:arg-name #:arg-type #:arg-value #:arg-default #:arg-repeating #:arg-rest
#:arg-optional #:arg-hidden #:arg-prompt #:arg-help #:arg-short-arg
#:arg-long-arg
;; argument types
#:arg-boolean #:arg-number #:arg-integer #:arg-float #:arg-character
#:arg-string #:arg-symbol #:arg-keyword #:arg-object
#:arg-case-preserving-object #:arg-sequence #:arg-list #:arg-function
#:arg-package #:arg-date #:arg-pathname #:arg-directory #:arg-choice
#:arg-choices #:arg-choice-labels #:arg-choice-test
#:arg-choice-compare-ignore-case #:arg-choice-compare #:arg-lenient-choice
#:arg-option #:arg-input-stream-or-filename
;; argument types for builtins
#:arg-job-descriptor #:arg-help-subject #:arg-boolean-toggle #:arg-signal
#:arg-pid-or-job #:arg-function #:arg-key-sequence #:arg-command
#:arg-system-designator #:arg-quicklisp-system-designator
#:arg-autoload-place
;; argument generics
#:convert-arg #:argument-choices
#:defargtype
;; commands
#:command #:command-name #:command-function #:command-arglist
#:command-built-in-p #:command-loaded-from #:command-accepts
#:internal-command #:shell-command #:builtin-command #:external-command
#:command-list
#:defcommand #:defexternal
#:!cd #:!pwd #:!pushd #:!popd #:!dirs #:!suspend #:!fg #:!bg #:!jobs
#:!history #:!echo #:!help #:!alias #:!unalias #:!exit #:!quit #:!source
#:!debug #:!export #:!env #:!kill #:!time #:!times #:!umask #:!ulimit
#:!wait #:!exec #:!bind #:!undefcommand #:!hash #:!type #:!opt #:!l #:!load
#:!ldirs #:!ql #:!autoload #:!doc #:!var
#:print-command-help
;; help
#:defhelp #:help-table #:help-function #:help-subjects
#:help-subjects-description #:help-on
;; convenience / scripting
#:alias #:set-alias #:unset-alias #:get-alias
#:command-paths
#:pipe
#:in-bg
#:in-pipe-p
#:out-pipe-p
#:append-file #:append-files
#:run-with-output-to
#:run-with-input-from
#:input-line-words
#:input-line-list
#:map-output-lines
#:command-output-words
#:command-output-list
#:with-streamlike-input
#:with-files-or-input
#:with-shell
#:run-with-env
;; magic punctuation
#:! #:!? #:!! #:!$ #:!$$ #:!@ #:!_ #:!-
#:!= #:!?= #:!!= #:!$= #:!$$= #:!@= #:!_= #:!-=
#:!and #:!or #:!bg
#:!> #:!>> #:!>! #:!>>!
#:!< #:!!<
#:!q #:!h #:!hh #:!v
;; internal-ish things that might want to be used
#:get-command
#:command-to-lisp-args
#:posix-to-lisp-args
#:expr-from-args
#:enable-sharp-dollar-reader
#:disable-sharp-dollar-reader
#:file-enable-sharp-dollar-reader
#:shell-read
#:shell-eval
#:shell-expand
#:shell-expand-to-list
#:fill-middle
#:gradientize
#:format-prompt
#:symbolic-prompt-to-string
#:load-file
#:expand-single-file-name
#:suspend-job
#:find-job
#:job #:job-id #:job-name #:job-command-line #:job-status
#:job-pid
#:continue-job-in-foreground
#:continue-job-in-background
#:kill-job
#:list-all-jobs
#:accepts
#:get-accepts
#:twiddlify
#:unix-truthy
#:shell-error #:shell-error-format #:shell-error-arguments
#:file-expansion #:file-expansion-files
))
;; End