inferior shell - lisp-cookbook-ja/common-lisp GitHub Wiki
- CUIコマンド実行ライブラリ なぜか、trivial-shellがうまく動作しなかったので、調べてみたらinferior-shellと言う物があるとのこと。
早速試してみたら、linuxでもWindowsでも問題なく動きました。
;;; inferior-shell Test
;; Documents -> http://quickdocs.org/inferior-shell/
(ql:quickload :inferior-shell)
(defun run-shell (run-command-string)
(inferior-shell:run
run-command-string ; this generates a string shell
; command from the arg FILE
:on-error #'print ; tells me that the exit code was 1
:output standard-output ; default, if I understand correctly
:interactive t) ; this was a shot in the dark
)
(run-shell "dir /w") ;; <- Windowsのコマンド
(run-shell "ls -alt") ;; <- Linuxのコマンド