-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
;;;; cmds/core/eval.lisp --- Evaluate lisp form with a proper PATH | ||
|
||
;;; Commentary | ||
;; | ||
;; The `eval' command definition. | ||
;; | ||
|
||
;;; Code | ||
|
||
(defpackage qob-cli/eval | ||
(:use cl) | ||
(:export command)) | ||
|
||
(in-package :qob-cli/eval) | ||
|
||
(defun options () | ||
"Options for `eval' command." | ||
(list )) | ||
|
||
(defun handler (cmd) | ||
"Handler for `eval' command." | ||
(qob-cli:call-script "core/eval" cmd)) | ||
|
||
(defun command () | ||
"The `eval' command." | ||
(clingon:make-command | ||
:name "eval" | ||
:description "Evaluate lisp form with a proper PATH" | ||
:options (options) | ||
:handler #'handler)) | ||
|
||
;;; End of cmds/core/eval.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
;;;; lisp/core/eval.lisp --- Evaluate lisp form with a proper PATH | ||
|
||
;;; Commentary | ||
;; | ||
;; Command use to eval lisp form. | ||
;; | ||
;; $ qob eval [forms..] | ||
;; | ||
|
||
;;; Code | ||
|
||
(qob-start | ||
(let* ((name (qob-args 0))) | ||
(qob-info name) | ||
(if name | ||
(qob-eval name) | ||
(progn | ||
(qob-info "(No expression found)") | ||
(qob-help "core/eval"))))) | ||
|
||
;;; End of lisp/core/eval.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters