29 Commits
Author SHA1 Message Date
HAYAMA_Kaoru 804d895c52 RunString: Optimized the initialization of *argv* 2025-05-04 18:13:04 +09:00
HAYAMA_Kaoru f8740f317c Improve the header comments of RunFile and RunScript 2025-05-04 17:27:41 +09:00
HAYAMA_Kaoru fe2080ba9a Add New function to construct and initialize Env instances
The `New` function creates a new `Env` that embeds a `gmnlisp.World` and sets up the necessary pseudoterminal and inter-goroutine communication channels. This allows users to execute Lisp code with flexible argument control and custom Go function integration, offering more control compared to `RunString` or `RunFile`.
2025-05-04 16:59:17 +09:00
HAYAMA_Kaoru ebdc6d7c20 Add *argv*, *program-name*, etc. as replacements for old global variable names 2025-05-04 03:43:30 +09:00
HAYAMA_Kaoru a970501d54 refactor: clarify argument descriptions in RunFile and RunString comments
Rewrote the function comments for RunFile and RunString to improve clarity
and stability under `go fmt`. The previous indentation-based formatting was
not preserved by `go fmt`, so the description style was revised to use
distinct bullet points for each argument.
2025-05-03 18:51:09 +09:00
HAYAMA_Kaoru 3a4fa09e5a Rename Global to Env for clarity and better library usability 2025-05-03 18:51:09 +09:00
HAYAMA_Kaoru 76d5a40b06 doc: add argument descriptions to RunFile and RunString 2025-05-03 17:21:14 +09:00
HAYAMA_Kaoru 1540549e72 Refactor: split core functionality into separate package 2025-05-03 12:56:37 +09:00
HAYAMA_Kaoru f8b93fb83a Rename variables to ARGV, PROGRAM-NAME, and EXECUTABLE-NAME 2024-12-05 12:47:58 +09:00
HAYAMA_Kaoru 7b7e0ebccc Implement (wait PID) 2024-12-05 12:11:09 +09:00
HAYAMA_Kaoru 4dc8a922c9 Implement (setenv KEY VAL) 2024-12-03 14:28:23 +09:00
HAYAMA_Kaoru f78d63989e Fix: on Linux, ~% feeded line, but it did not carriage return 2024-12-03 08:22:26 +09:00
HAYAMA_Kaoru 9c73fd4215 Implement $EXECUTABLE_NAME 2024-12-02 10:28:27 +09:00
HAYAMA_Kaoru 69968caa69 Implement $PROGRAM_NAME for script name 2024-12-02 10:16:19 +09:00
HAYAMA_Kaoru 31510725b1 Fix: args was set os.Args[1:]. It should be os.Args[2:] 2024-12-02 06:02:16 +09:00
HAYAMA_Kaoru e87734560e With no arguments, print version and architecture information 2024-12-01 22:53:20 +09:00
HAYAMA_Kaoru 1b20e3b846 Support aborting with Ctrl-C 2024-12-01 13:09:16 +09:00
HAYAMA_Kaoru f96eb75f49 Implement the option 'interval for (send) and (sendln) 2024-12-01 12:54:17 +09:00
HAYAMA_Kaoru cf747dcac7 Implement (getenv) 2024-11-30 11:22:19 +09:00
HAYAMA_Kaoru 4ffb196563 Implement (expect) like (case) 2024-11-30 02:28:24 +09:00
HAYAMA_Kaoru de6a18813b Implement (send) 2024-11-30 01:09:34 +09:00
HAYAMA_Kaoru c99698837d (expect*) supports the option 'timeout SECOND 2024-11-30 01:09:34 +09:00
HAYAMA_Kaoru 43ae74149d Move Global method to global.go 2024-11-29 23:59:23 +09:00
HAYAMA_Kaoru 5539fb85ad Read script from argv[1] 2024-11-29 23:48:08 +09:00
HAYAMA_Kaoru 6906ab0c4d Embbed gmnlisp interpreter 2024-11-29 17:57:13 +09:00
HAYAMA_Kaoru 022810feee New class Term 2024-11-29 13:44:11 +09:00
HAYAMA_Kaoru 9bca54b14e Add (*Watcher) ExpectWithTimeout 2024-11-29 12:49:11 +09:00
HAYAMA_Kaoru 0961e035fc New class Watcher 2024-11-29 11:59:56 +09:00
HAYAMA_Kaoru eec555f935 Copy the base source from hymkor/script 2024-11-29 09:26:17 +09:00