From 6e4aeb7c9e8391626a627610592268807247572a Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 31 Jan 2021 01:42:35 -0500 Subject: Launch game immediately with SSH_ORIGINAL_COMMAND --- play.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/play.c b/play.c index ef6cb15..e83ab7e 100644 --- a/play.c +++ b/play.c @@ -187,7 +187,10 @@ static const struct Game { }; static const struct Game *menu(void) { - curse(); + const char *cmd = getenv("SSH_ORIGINAL_COMMAND"); + for (uint i = 0; cmd && i < ARRAY_LEN(Games); ++i) { + if (!strcmp(Games[i].name, cmd)) return &Games[i]; + } uint game = 0; for (;;) { for (uint i = 0; i < ARRAY_LEN(Games); ++i) { @@ -245,6 +248,7 @@ int main(int argc, char *argv[]) { return EX_OK; } + curse(); const struct Game *game = menu(); if (!game) goto done; erase(); -- cgit 1.4.1 ='sub right'>
summary refs log tree commit diff
path: root/txt (unfollow)
Commit message (Expand)Author
2024-07-10Add the end of the Harman Phoenix rollJune McEnroe
2024-07-08Add photos from July 3, the hikeJune McEnroe
2024-07-07Add photos from July 1June McEnroe
2024-07-07Add photos from June 25-30June McEnroe
2024-06-30Add photos from June 22 (and the few days after that)June McEnroe
2024-06-30Accommodate lower-case .jpg filesJune McEnroe
2024-06-23Add another BACKXWASH showJune McEnroe
2024-06-16Update bioJune McEnroe
2024-06-15Add photo descriptions from June 12June McEnroe
2024-06-10Add first roll of film from June 8June McEnroe
2024-06-10Cope with not having an EXIF infoJune McEnroe
2024-06-10Resize using target pixel counts for consistencyJune McEnroe
2024-06-10Add The Girl Who Was Convinced...June McEnroe
2024-06-09Add photos from May 31June McEnroe
2024-06-09Use monospace on photo pagesJune McEnroe
2024-06-09Put lens and (future) film at the tops of photo pagesJune McEnroe
2024-05-22Remove use of sysexits.hJune McEnroe
2024-05-22Add photo descriptions from 05-03 and 05-06June McEnroe
2024-05-21Fix = precedence in whenJune McEnroe