aboutsummaryrefslogtreecommitdiff
path: root/snakemake.el
diff options
context:
space:
mode:
Diffstat (limited to 'snakemake.el')
-rw-r--r--snakemake.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/snakemake.el b/snakemake.el
index cc6bc3f..fa200bd 100644
--- a/snakemake.el
+++ b/snakemake.el
@@ -211,21 +211,25 @@ with DIRECTORY and the Snakefile's modification time."
(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"))))))
+ (cl-remove-if
+ (lambda (x) (string-match-p "\\`[0-9]+\\'" x))
+ (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")
- (split-string
- (with-temp-buffer
- (if (= 0 (snakemake-insert-output
- "--nocolor" "--list-target-rules"))
- (buffer-string)
- (error "Error finding rule targets"))))))
+ (cl-remove-if
+ (lambda (x) (string-match-p "\\`[0-9]+\\'" x))
+ (split-string
+ (with-temp-buffer
+ (if (= 0 (snakemake-insert-output
+ "--nocolor" "--list-target-rules"))
+ (buffer-string)
+ (error "Error finding rule targets")))))))
(defun snakemake-file-targets (&optional directory)
"Return list of output files for DIRECTORY's Snakefile.