summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMorgan Smith2023-06-04 18:41:32 -0400
committerArun Isaac2023-06-06 22:55:13 +0100
commitd63ba6ff74145b8b9b5b4df73ab1b6bb971b30e9 (patch)
treeffc69b37ad08e3e9db91d0a50a4c90bbb6f37974 /bin
parentdcc90b424aa5bd05ffc5afc0d5d5a13bdd0508ee (diff)
downloadtissue-d63ba6ff74145b8b9b5b4df73ab1b6bb971b30e9.tar.gz
tissue-d63ba6ff74145b8b9b5b4df73ab1b6bb971b30e9.tar.lz
tissue-d63ba6ff74145b8b9b5b4df73ab1b6bb971b30e9.zip
bin: Allow main file to be loaded without executing main.
Call main from the shebang command instead of calling it directly. This allows us to run "guile -l bin/tissue" without actually running main. This seems to be important for Emacs Geiser as it freezes up without this fix. * bin/tissue: Call main from shebang. Do not call main directly. (main): Accept args as regular argument instead of as a rest argument. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tissue8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/tissue b/bin/tissue
index 31ec574..afad9e4 100755
--- a/bin/tissue
+++ b/bin/tissue
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
# -*- mode: scheme; -*-
-exec guile --no-auto-compile -s "$0" "$@"
+exec guile --no-auto-compile -e main -s "$0" "$@"
!#
;;; tissue --- Text based issue tracker
@@ -489,7 +489,7 @@ Pull latest from upstream repositories.
hostname)
(exit #f)))))))))
-(define (main . args)
+(define (main args)
(guard (c ((condition-git-error c)
=> (lambda (git-error)
(display (git-error-message git-error) (current-error-port))
@@ -549,6 +549,4 @@ Pull latest from upstream repositories.
args))))))
;; tissue is an alias for `tissue search'
((_)
- (main "tissue" "search")))))
-
-(apply main (command-line))
+ (main '("tissue" "search"))))))