From f58962a1753e5944a18b64a70ef06fac81d1b891 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 00:21:03 +0300 Subject: [PATCH 01/15] docs(readme): wrap all code in code blocks Increases readability. --- README.md | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index a2cc532..d7ee877 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ $ ./instead-cli System wide setup: -Edit Makefile.defs. +Edit `Makefile.defs`. ``` DESTDIR=/ @@ -44,29 +44,31 @@ $ make && sudo make install ## Run +```bash ./instead-cli +``` -To pass internal command to STEAD use '/' prefix. Some internal commands: +To pass internal command to STEAD use `/` prefix. Some internal commands: -* /save filename -* /load filename -* /quit -* /inv -* /look +* `/save filename` +* `/load filename` +* `/quit` +* `/inv` +* `/look` Options: -* -d - debug mode; -* -dfile - debug mode + write stderr to file; -* -wnum - line width is num symbols (70 by default); -* -iscript - read script line by line and use it as commands; -* -lfile - write all input commands to file; -* -cpCODEPAGE - Win only (1251 by default), use 65001 for UTF-8; -* -a - autosave on exit and autoload on start (autosave file); -* -x - execute lua script; -* -e - echo input command; -* -m - enable multimedia output; -* -mcmd - enable run cmd on multimedia. Examples: -m/usr/bin/xdg-open (Linux), -m/bin/plumb (Plan9), -m"start\"\"" (Windows). +* `-d` - debug mode; +* `-dfile` - debug mode + write stderr to file; +* `-wnum` - line width is num symbols (70 by default); +* `-iscript` - read script line by line and use it as commands; +* `-lfile` - write all input commands to file; +* `-cpCODEPAGE` - Win only (1251 by default), use 65001 for UTF-8; +* `-a` - autosave on exit and autoload on start (autosave file); +* `-x` - execute lua script; +* `-e` - echo input command; +* `-m` - enable multimedia output; +* `-mcmd` - enable run cmd on multimedia. Examples: `-m/usr/bin/xdg-open` (Linux), `-m/bin/plumb` (Plan9), `-m"start\"\""` (Windows). ## Links From 3dbb45efb50c529110719262714b4b85cf01aaa0 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 00:22:24 +0300 Subject: [PATCH 02/15] docs(readme): set languages to code blocks --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d7ee877..03a9752 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Trivial INSTEAD interpreter for developers. Dependencies: luajit (or lua), iconv. -``` +```bash $ git clone https://github.com/instead-hub/instead-cli.git $ cd instead-cli $ git submodule init @@ -21,7 +21,7 @@ System wide setup: Edit `Makefile.defs`. -``` +```bash DESTDIR=/ BIN=/usr/local/bin STEADPATH=/usr/local/share/instead-cli/ @@ -29,13 +29,13 @@ STEADPATH=/usr/local/share/instead-cli/ Then: -``` +```bash $ make && sudo make install ``` ### 9front (Plan9) build -``` +```bash % git/clone https://github.com/instead-hub/instead-cli.git % mk init % mk From 6b4a33b337719eca13d4aec11c5a25d602cdd299 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 01:48:14 +0300 Subject: [PATCH 03/15] docs(readme): add `/act` --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 03a9752..19056aa 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,23 @@ $ make && sudo make install To pass internal command to STEAD use `/` prefix. Some internal commands: +* `/act 1` (or just `1`) + + ```bash + $ instead-cli fantasy-game + Room + + The lever(1) on the wall is raised. + + > /act 1 + The lever(1) on the wall is lowered. + + > 1 + The lever(1) on the wall is raised. + + > + ``` + * `/save filename` * `/load filename` * `/quit` From 6041f3c1fb477798957021841573846e427912c7 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:04:43 +0300 Subject: [PATCH 04/15] docs(readme): add `/use` --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 19056aa..319c234 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,28 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: > ``` +* `/use 1,2` (or just `1,2`) + + ```bash + $ instead-cli apple-game + Room + + The apple(1) is lying on the floor. The table(2) stands in the + corner. + + > 1 + /I take the apple./ + + The table(1) stands in the corner. + + ** Apple(2) + + > 2,1 + The table(1) stands in the corner. The apple(2) lies on the table. + + > + ``` + * `/save filename` * `/load filename` * `/quit` From a8ad7743519c9a5939f364381a61720fe12f8b3f Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:05:47 +0300 Subject: [PATCH 05/15] docs(readme): rename "Build and run" header to "Build" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 319c234..d7bfb51 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Trivial INSTEAD interpreter for developers. -## Build and run +## Build Dependencies: luajit (or lua), iconv. From 39b8539754ecbf38d5e9eb9bfeb92d7c31bfecf6 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:40:59 +0300 Subject: [PATCH 06/15] docs(readme): add `/go` --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index d7bfb51..2fd88ad 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,36 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: > ``` +* `/go 1` (or just `1`) + + ```bash + $ instead-cli game/ + Room + + The lever(1) on the wall is raised. + + > + + >> Kitchen(2) + + > /go 2 + Kitchen + + The apple(1) is lying on the floor. The table(2) stands in the + corner. + + > + + >> Room(3) + + > 3 + Room + + The lever(1) on the wall is raised. + + >> Kitchen(2) + ``` + * `/save filename` * `/load filename` * `/quit` From cbe25313cbb70ea9fee6ceaafc46327838186c73 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:43:41 +0300 Subject: [PATCH 07/15] docs(readme): describe `/inv` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fd88ad..ddbc495 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: * `/save filename` * `/load filename` * `/quit` -* `/inv` +* `/inv` — return items in the inventory * `/look` Options: From 6f1d61b6e06e413ea4cc6b8d3b5caabe18cc8a67 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:44:38 +0300 Subject: [PATCH 08/15] docs(readme): describe `/look` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ddbc495..bd6998b 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: * `/load filename` * `/quit` * `/inv` — return items in the inventory -* `/look` +* `/look` — return the description of the current room Options: From 60df94ffca2066a7104b062c693e71c296a78589 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:49:21 +0300 Subject: [PATCH 09/15] docs(readme): add `/way` --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bd6998b..e0b30ae 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: >> Kitchen(2) ``` +* `/way` (or just empty line) — return list of ways from current room * `/save filename` * `/load filename` * `/quit` From b929699a08c0e48c1166c7a1fc7ec5d11e3725a7 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:49:58 +0300 Subject: [PATCH 10/15] docs(readme): add "just empty line" to `/inv` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e0b30ae..5ee08c3 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: * `/save filename` * `/load filename` * `/quit` -* `/inv` — return items in the inventory +* `/inv` (or just empty line) — return items in the inventory * `/look` — return the description of the current room Options: From 25867f29b880e57cc13e67de426db070bcb9652a Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:51:36 +0300 Subject: [PATCH 11/15] docs(readme): sort commands in order of possible usage --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ee08c3..b674596 100644 --- a/README.md +++ b/README.md @@ -120,11 +120,11 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: ``` * `/way` (or just empty line) — return list of ways from current room +* `/inv` (or just empty line) — return items in the inventory +* `/look` — return the description of the current room * `/save filename` * `/load filename` * `/quit` -* `/inv` (or just empty line) — return items in the inventory -* `/look` — return the description of the current room Options: From 39125def78fb7f060868dcf0c5ad9172efacae93 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Wed, 13 Aug 2025 17:54:13 +0300 Subject: [PATCH 12/15] docs(readme): describe `/use` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b674596..d8cf7e5 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: > ``` -* `/use 1,2` (or just `1,2`) +* `/use 1,2` (or just `1,2`) — use item from inventory on another item of inventory or object in room ```bash $ instead-cli apple-game From 9fe6dee8920c9b03563afad65aa93cdfafef490e Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Sat, 16 Aug 2025 12:27:49 +0300 Subject: [PATCH 13/15] docs(readme): describe `/act` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d8cf7e5..7faeb56 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ $ make && sudo make install To pass internal command to STEAD use `/` prefix. Some internal commands: -* `/act 1` (or just `1`) +* `/act 1` (or just `1`) — interact with object in room (if object has `tak` field, then activate it; if object has `act`, then activate it) ```bash $ instead-cli fantasy-game From f42911ddf320cee1e69c15ba9f433e75bd82616d Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Sat, 16 Aug 2025 14:48:13 +0300 Subject: [PATCH 14/15] docs(readme): update `/act` description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7faeb56..861d3b9 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ $ make && sudo make install To pass internal command to STEAD use `/` prefix. Some internal commands: -* `/act 1` (or just `1`) — interact with object in room (if object has `tak` field, then activate it; if object has `act`, then activate it) +* `/act 1` (or just `1`) — interact with object in room (if object has `tak` field, it is activated; otherwise, `act` field (if defined) is activated) ```bash $ instead-cli fantasy-game From 7d27ce3ad4baae6b1cc6670bc103c9d59cedf7b3 Mon Sep 17 00:00:00 2001 From: gretmn102 Date: Sat, 16 Aug 2025 14:51:24 +0300 Subject: [PATCH 15/15] docs(readme): update `/use` description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 861d3b9..1be0e85 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ To pass internal command to STEAD use `/` prefix. Some internal commands: > ``` -* `/use 1,2` (or just `1,2`) — use item from inventory on another item of inventory or object in room +* `/use 1 2` (or just `1,2`) — use item from inventory on another item of inventory or object in room ```bash $ instead-cli apple-game