File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -553,6 +553,35 @@ According to Common Lisp HyperSpec:
553553(asdf:asdf-version)
554554----
555555
556+ == Running external program
557+
558+ === With ASDF's UIOP
559+
560+ [source,lisp,linenums]
561+ ----
562+ ;; uiop:run-program returns `output', `error', `return-value'
563+
564+ ;; Just run it
565+ (uiop:run-program "ls")
566+
567+ ;; Output to `*standard-output*'
568+ (uiop:run-program "ls" :output t)
569+
570+ ;; Output as string
571+ (uiop:run-program "ls" :output :string)
572+ ;; Extra ending newline stripped
573+ (uiop:run-program "ls" :output '(:string :stripped t))
574+
575+ ;; Feeding input
576+ (uiop:run-program "cat" :input (make-string-input-stream "hello world"))
577+
578+ ;; With shell
579+ (uiop:run-program "ls / | grep tmp" :output '(:string :stripped t) :force-shell t)
580+ ----
581+
582+ See https://common-lisp.net/project/asdf/asdf/Some-Utility-Functions.html[ASDF
583+ documentation] for more information.
584+
556585
557586== Useful libraries
558587
You can’t perform that action at this time.
0 commit comments