From 94514f7dd03c48578dceb1ed478ab891336c1c28 Mon Sep 17 00:00:00 2001 From: James Eversole Date: Thu, 22 May 2025 16:52:37 -0500 Subject: [PATCH] Update README and !help REPL command --- README.md | 23 ++++++++++++++--------- src/REPL.hs | 9 ++++----- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b730982..eeb4739 100644 --- a/README.md +++ b/README.md @@ -41,15 +41,20 @@ tricu < -- or calculate its size (/demos/size.tri) tricu < size not? tricu > 12 -tricu < -- REPL Commands: -tricu < !definitions -- Lists all available definitions -tricu < !output -- Change output format (Tree, FSL, AST, etc.) -tricu < !import -- Import definitions from a file -tricu < !exit -- Exit the REPL -tricu < !clear -- ANSI screen clear -tricu < !save -- Save all REPL definitions to a file that you can !import -tricu < !reset -- Clear all REPL definitions -tricu < !version -- Print tricu version +tricu < !help +tricu version 0.20.0 +Available commands: + !exit - Exit the REPL + !clear - Clear the screen + !reset - Reset preferences for selected versions + !help - Show tricu version and available commands + !output - Change output format (tree|fsl|ast|ternary|ascii|decode) + !definitions - List all defined terms in the content store + !import - Import definitions from file (definitions are stored) + !watch - Watch a file for changes (definitions are stored) + !versions - Show all versions of a term by name + !select - Select a specific version of a term for subsequent lookups + !tag - Add or update a tag for a term by hash or name ``` ## Content Store diff --git a/src/REPL.hs b/src/REPL.hs index f133be8..873a460 100644 --- a/src/REPL.hs +++ b/src/REPL.hs @@ -101,16 +101,15 @@ repl = do outputStrLn "Available commands:" outputStrLn " !exit - Exit the REPL" outputStrLn " !clear - Clear the screen" - outputStrLn " !reset - Reset selected versions (for lookups)" + outputStrLn " !reset - Reset preferences for selected versions" outputStrLn " !help - Show tricu version and available commands" outputStrLn " !output - Change output format (tree|fsl|ast|ternary|ascii|decode)" outputStrLn " !definitions - List all defined terms in the content store" - outputStrLn " !import - Import definitions from file (definitions are stored)" - outputStrLn " !watch - Watch a file for changes (definitions are stored)" - outputStrLn " !refresh - (Currently no-op, definitions are live)" + outputStrLn " !import - Import definitions from file to the content store" + outputStrLn " !watch - Watch a file for changes, evaluate terms, and store them" outputStrLn " !versions - Show all versions of a term by name" outputStrLn " !select - Select a specific version of a term for subsequent lookups" - outputStrLn " !tag - Add or update a tag for a term (by hash or name)" + outputStrLn " !tag - Add or update a tag for a term by hash or name" loop state | strip s == "!output" -> handleOutput state | strip s == "!definitions" -> handleDefinitions state