From 983fc85243a5b914cc2fbfaee60e0e1e6ef0b614 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 29 Jun 2022 01:13:26 +0530 Subject: tissue: Add `tissue index' subcommand. * bin/tissue (tissue-index): New function. (print-usage): List `tissue index' subcommand. (main): Call tissue-index. --- bin/tissue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/tissue b/bin/tissue index 7cc4a95..3ade799 100755 --- a/bin/tissue +++ b/bin/tissue @@ -254,6 +254,18 @@ Run a web search service for the current repository. %xapian-index (tissue-configuration-web-css (load-config))))))) +;; This is a noop, since the index is built on any tissue command. It +;; exists just for the --help usage summary. +(define tissue-index + (match-lambda* + (("--help") + (format #t "Usage: ~a index +Index files in repository. + +" + (command-line-program))) + (() #t))) + (define (print-usage) (format #t "Usage: ~a COMMAND [OPTIONS] [ARGS] @@ -264,6 +276,7 @@ COMMAND must be one of the sub-commands listed below: repl run a Guile script in a tissue environment web export repository as website run-web run a web search service + index index files To get usage information for one of these sub-commands, run ~a COMMAND --help @@ -332,6 +345,7 @@ top-level of the git repository." ("repl" tissue-repl) ("web" tissue-web) ("run-web" tissue-run-web) + ("index" tissue-index) (invalid-command (format (current-error-port) "Invalid command `~a'~%~%" invalid-command) -- cgit v1.2.3