summaryrefslogtreecommitdiff
path: root/snakemake.el
diff options
context:
space:
mode:
Diffstat (limited to 'snakemake.el')
-rw-r--r--snakemake.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/snakemake.el b/snakemake.el
index 8a985ee..396290a 100644
--- a/snakemake.el
+++ b/snakemake.el
@@ -173,6 +173,15 @@ with DIRECTORY and the Snakefile's modification time."
"Call `snakemake-program' with ARGS and insert output."
(apply #'call-process snakemake-program nil t nil args))
+(defun snakemake-all-rules (&optional directory)
+ "Return list of rules for DIRECTORY's Snakefile."
+ (snakemake-with-cache directory ("all-rules")
+ (split-string
+ (with-temp-buffer
+ (if (= 0 (snakemake-insert-output "--nocolor" "--list"))
+ (buffer-string)
+ (error "Error finding rules"))))))
+
(defun snakemake-rule-targets (&optional directory)
"Return list of target rules for DIRECTORY's Snakefile."
(snakemake-with-cache directory ("target-rules")