Skip to content

Commit

Permalink
chore: Rename eask rest args
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Dec 3, 2023
1 parent 81cb627 commit 89f50b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lisp/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ Arguments FNC and ARGS are used for advice `:around'."
(defconst eask-is-pkg (getenv "EASK_IS_PKG")
"Eask is pkg.")

(defconst eask-rest-args
(defconst eask-rest
(let ((args (getenv "EASK_REST_ARGS")))
(setq args (split-string args ","))
(setq args (ignore-errors (split-string args ",")))
args)
"Eask arguments in list after command separator `--'.
If the argument is `-- hello world'; it will return `(hello world)'.")

(defun eask-rest-args ()
(defun eask-rest ()
"Eask arguments in string after command separator `--'.
If the argument is `-- hello world'; it will return `hello world'."
(mapconcat #'identity eask-rest-args " "))
(mapconcat #'identity eask-rest " "))

(defcustom eask-import-timeout 10
"Number of seconds before timing out elisp importation attempts.
Expand Down
2 changes: 1 addition & 1 deletion lisp/run/script.el
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
;;
;; We must split up all commands!
(setq command (eask-s-replace " && " "\n" command)))
(setq command (concat command " " (eask-rest-args)))
(setq command (concat command " " (eask-rest)))
(write-region (concat command "\n") nil eask--run-file t))

(defun eask--unmatched-scripts (scripts)
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/mini.emacs.pkg.1/Eask
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(eask-defcommand mini-test-2 "Test command 2." (message "Test 2"))
(eask-defcommand mini-test-3
"Test command 3."
(message "Test 3: %s" eask-rest-args))
(message "Test 3: %s" eask-rest))

(source "gnu")
(source "melpa")
Expand Down

0 comments on commit 89f50b1

Please sign in to comment.