Skip to content

Commit

Permalink
Add Unstable flag to transient (#32)
Browse files Browse the repository at this point in the history
* Add unstable flag to transient

* Add test to show that !include directives are not detected as recipe lines

* Update README.org
  • Loading branch information
johnhamelink authored Jun 11, 2023
1 parent 30ab3e8 commit a85d81d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ W => open eshell without executing

* Customize

- Because the help popup is built with transient, you can [[https://www.gnu.org/software/emacs//manual/html_node/transient/Saving-Values.html][set and save
your choices]] the same way you would with any other transient
dialog.
- By default, justl searches the executable named *just*, you can
change the /justl-executable/ variable to set any explicit path.
- You can also control the width of the RECIPE column in the justl
Expand Down
10 changes: 7 additions & 3 deletions justl.el
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,12 @@ and output of process."

(defun justl--get-recipies-with-desc (justfile)
"Return all the recipies in JUSTFILE with description."
(let* ((recipe-status (justl--exec-to-string-with-exit-code
(format "%s --justfile=%s --list --unsorted"
justl-executable justfile)))
(let* ((t-args (transient-args 'justl-help-popup))
(recipe-status (justl--exec-to-string-with-exit-code
(format "%s %s --justfile=%s --list --unsorted"
justl-executable
(string-join t-args " ")
justfile)))
(justl-status (nth 0 recipe-status))
(recipe-lines (split-string
(nth 1 recipe-status)
Expand Down Expand Up @@ -627,6 +630,7 @@ tweaked further by the user."
("-n" "Disable Highlight" "--no-highlight")
("-q" "Quiet" "--quiet")
("-v" "Verbose output" "--verbose")
("-u" "Unstable" "--unstable")
(justl--color)
]
["Actions"
Expand Down
3 changes: 3 additions & 0 deletions test/justl-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
(should (equal
(justl--is-recipe-line-p "# Terraform plan")
nil))
(should (equal
(justl--is-recipe-line-p "!include lorem.just")
nil))
(should (equal
(justl--is-recipe-line-p "push version: (build-cmd version)")
t))
Expand Down

0 comments on commit a85d81d

Please sign in to comment.