summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorArun Isaac2022-03-18 16:14:45 +0530
committerArun Isaac2022-03-18 16:24:43 +0530
commitf7fe6f27ea67901ee51ec91c9fdd40fcd13e8d4b (patch)
tree5ecb5445c47479fd6dadb0e8e88fe863ba52f766 /bin
parent2fabe47a52ee71692648eb22218c696e1e213673 (diff)
downloadtissue-f7fe6f27ea67901ee51ec91c9fdd40fcd13e8d4b.tar.gz
tissue-f7fe6f27ea67901ee51ec91c9fdd40fcd13e8d4b.tar.lz
tissue-f7fe6f27ea67901ee51ec91c9fdd40fcd13e8d4b.zip
issue: Resolve authors and assignees using aliases.
* bin/tissue (main): Load config and parameterize %aliases.
* tissue/issue.scm (%aliases): New public parameter.
(resolve-alias): New function.
(file-details): Resolve authors and assignees using aliases.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tissue25
1 files changed, 13 insertions, 12 deletions
diff --git a/bin/tissue b/bin/tissue
index 93612e3..3e249c9 100755
--- a/bin/tissue
+++ b/bin/tissue
@@ -402,18 +402,19 @@ To get usage information for one of these sub-commands, run
                          (current-error-port))
                 (newline (current-error-port))
                 (exit #f)))
-       (apply (match command
-                ("news" tissue-news)
-                ("list" tissue-list)
-                ("edit" tissue-edit)
-                ("show" tissue-show)
-                ("web" tissue-web)
-                (invalid-command
-                 (format (current-error-port) "Invalid command `~a'~%~%"
-                         invalid-command)
-                 (print-usage)
-                 (exit #f)))
-              args)))
+       (parameterize ((%aliases (tissue-configuration-aliases (load-config))))
+         (apply (match command
+                  ("news" tissue-news)
+                  ("list" tissue-list)
+                  ("edit" tissue-edit)
+                  ("show" tissue-show)
+                  ("web" tissue-web)
+                  (invalid-command
+                   (format (current-error-port) "Invalid command `~a'~%~%"
+                           invalid-command)
+                   (print-usage)
+                   (exit #f)))
+                args))))
     ;; tissue is an alias for `tissue list'
     ((_)
      (tissue-list))))