From 742bcacc541e76ea2a982a8f14aafe48aae33dec Mon Sep 17 00:00:00 2001
From: dan <me@danrh.co.uk>
Date: Thu, 25 May 2023 11:33:14 -0400
Subject: docs: update readme.md ; add run-rlwrap makefile command; add rlwrap
 completions file

---
 makefile                |  7 +++++++
 readme.md               | 15 ++++++++++-----
 rlwrapcompletions.forth | 19 +++++++++++++++++++
 3 files changed, 36 insertions(+), 5 deletions(-)
 create mode 100644 makefile
 create mode 100644 rlwrapcompletions.forth

diff --git a/makefile b/makefile
new file mode 100644
index 0000000..db42381
--- /dev/null
+++ b/makefile
@@ -0,0 +1,7 @@
+build:
+	gcc forth.c optable.c stack.c -o forth
+run:
+	./forth
+run-rlwrap:
+	rlwrap -r -f rlwrapcompletions.forth ./forth
+
diff --git a/readme.md b/readme.md
index bcc8cad..42a0877 100644
--- a/readme.md
+++ b/readme.md
@@ -2,9 +2,14 @@ Forth-style Stack Language with C and JS implementations.
 
 JS implementation can be run by opening index.html in a web browser or running `node forth.js`.
 
-C implementation can be compiled with gcc (`gcc forth.c -o forth`) and then run `./forth`.
+Assuming you have gcc and make installed, the C implementation can be built with `make build`, then run with `./forth`.
+
+If you also have rlwrap installed, you can run `make run-rlwrap`, to get completions, history, and more pleasant line-editing.
+
+_Be aware:_
+
+ - Neither implementation is finished
+ - The instruction sets have _different_ missing features
+ - This is a toy language, not intended for serious use
+
 
-Be aware:
-- Neither implementation is finished
-- The instruction sets have _different_ missing features
-- This is a toy language, not intended for serious use
diff --git a/rlwrapcompletions.forth b/rlwrapcompletions.forth
new file mode 100644
index 0000000..80e9a36
--- /dev/null
+++ b/rlwrapcompletions.forth
@@ -0,0 +1,19 @@
+pop
+push
+peek
+if
+then
+:
+;
++
+-
+*
+/
+dup
+dump
+not
+=
+swap
+drop
+over
+rot
-- 
cgit v1.2.3