Update README and !help REPL command

This commit is contained in:
2025-05-22 16:52:37 -05:00
parent 43e83be9a4
commit 94514f7dd0
2 changed files with 18 additions and 14 deletions

View File

@ -41,15 +41,20 @@ tricu < -- or calculate its size (/demos/size.tri)
tricu < size not? tricu < size not?
tricu > 12 tricu > 12
tricu < -- REPL Commands: tricu < !help
tricu < !definitions -- Lists all available definitions tricu version 0.20.0
tricu < !output -- Change output format (Tree, FSL, AST, etc.) Available commands:
tricu < !import -- Import definitions from a file !exit - Exit the REPL
tricu < !exit -- Exit the REPL !clear - Clear the screen
tricu < !clear -- ANSI screen clear !reset - Reset preferences for selected versions
tricu < !save -- Save all REPL definitions to a file that you can !import !help - Show tricu version and available commands
tricu < !reset -- Clear all REPL definitions !output - Change output format (tree|fsl|ast|ternary|ascii|decode)
tricu < !version -- Print tricu version !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 ## Content Store

View File

@ -101,16 +101,15 @@ repl = do
outputStrLn "Available commands:" outputStrLn "Available commands:"
outputStrLn " !exit - Exit the REPL" outputStrLn " !exit - Exit the REPL"
outputStrLn " !clear - Clear the screen" 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 " !help - Show tricu version and available commands"
outputStrLn " !output - Change output format (tree|fsl|ast|ternary|ascii|decode)" outputStrLn " !output - Change output format (tree|fsl|ast|ternary|ascii|decode)"
outputStrLn " !definitions - List all defined terms in the content store" outputStrLn " !definitions - List all defined terms in the content store"
outputStrLn " !import - Import definitions from file (definitions are stored)" outputStrLn " !import - Import definitions from file to the content store"
outputStrLn " !watch - Watch a file for changes (definitions are stored)" outputStrLn " !watch - Watch a file for changes, evaluate terms, and store them"
outputStrLn " !refresh - (Currently no-op, definitions are live)"
outputStrLn " !versions - Show all versions of a term by name" outputStrLn " !versions - Show all versions of a term by name"
outputStrLn " !select - Select a specific version of a term for subsequent lookups" 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 loop state
| strip s == "!output" -> handleOutput state | strip s == "!output" -> handleOutput state
| strip s == "!definitions" -> handleDefinitions state | strip s == "!definitions" -> handleDefinitions state