mirror of
https://github.com/hymkor/lispect.git
synced 2026-08-28 04:46:59 -04:00
README: update variable descriptions and example to reflect new names
This commit is contained in:
@@ -14,15 +14,18 @@ Lispect
|
|||||||
$ `lispect example.lsp USERNAME@DOMAIN PASSWORD`
|
$ `lispect example.lsp USERNAME@DOMAIN PASSWORD`
|
||||||
→ login `USERNAME@DOMAIN` with `ssh` and input `PASSWORD` automatically
|
→ login `USERNAME@DOMAIN` with `ssh` and input `PASSWORD` automatically
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> Some variable names have been updated for compatibility with recent versions of gmnlisp, but the old names remain available for now.
|
||||||
|
|
||||||
```example.lsp
|
```example.lsp
|
||||||
(catch 'fail
|
(catch 'fail
|
||||||
(if (< (length ARGV) 2)
|
(if (< (length ARGV) 2)
|
||||||
(progn
|
(progn
|
||||||
(format (error-output) "Usage: ~A ~A USERNAME@DOMAIN PASSWORD~%" EXECUTABLE-NAME PROGRAM-NAME)
|
(format (error-output) "Usage: ~A ~A USERNAME@DOMAIN PASSWORD~%" *executable-name* *program-name*)
|
||||||
(throw 'fail nil)))
|
(throw 'fail nil)))
|
||||||
|
|
||||||
(let ((account (car ARGV))
|
(let ((account (car *argv*))
|
||||||
(password (cadr ARGV))
|
(password (cadr *argv*))
|
||||||
(sshpid nil))
|
(sshpid nil))
|
||||||
|
|
||||||
(with-handler
|
(with-handler
|
||||||
@@ -110,20 +113,21 @@ Parameters enclosed in curly braces {...} are optional and can be omitted.
|
|||||||
- Get the value of the environment variable NAME
|
- Get the value of the environment variable NAME
|
||||||
- `(setenv "NAME" "VALUE")`
|
- `(setenv "NAME" "VALUE")`
|
||||||
- Set the value of the environment variable NAME as VALUE
|
- Set the value of the environment variable NAME as VALUE
|
||||||
- `ARGV`
|
- `*argv*` (formerly `ARGV`, now deprecated)[^1]
|
||||||
- The list of command line arguments
|
The list of command-line arguments.
|
||||||
- `PROGRAM-NAME`
|
- `*program-name*` (formerly `PROGRAM-NAME`, now deprecated)[^1]
|
||||||
- The path of the script
|
The path to the script.
|
||||||
- `EXECUTABLE-NAME`
|
- `*executable-name*` (formerly `EXECUTABLE-NAME`, now deprecated)[^1]
|
||||||
- The path of the executable of lispect
|
The path to the Lispect executable.
|
||||||
- `MATCH`
|
- `*match*` (formerly `MATCH`, now deprecated)[^1]
|
||||||
- The matching string in the block of `(expect*)`
|
The matched string in an `(expect*)` block.
|
||||||
- `(catch TAG-FORM FORM...)` and `(throw TAG-FORM RESULT-FORM)`
|
- `(catch TAG-FORM FORM...)` and `(throw TAG-FORM RESULT-FORM)`
|
||||||
- Non-local exits. See also [ISLISP draft - 14.7. Non-local exits](https://islisp-dev.github.io/ISLispHyperDraft/islisp-v23.html#non_local_exits)
|
- Non-local exits. See also [ISLISP draft - 14.7. Non-local exits](https://islisp-dev.github.io/ISLispHyperDraft/islisp-v23.html#non_local_exits)
|
||||||
- `(with-handler HANDLER FORM...)`
|
- `(with-handler HANDLER FORM...)`
|
||||||
- When an error occurs in `FORMS...`, call `HANDLER`.
|
- When an error occurs in `FORMS...`, call `HANDLER`.
|
||||||
See also [ISLISP Draft - Operations relating to condition handling](https://islisp-dev.github.io/ISLispHyperDraft/islisp-v23.html#s_with_handler)
|
See also [ISLISP Draft - Operations relating to condition handling](https://islisp-dev.github.io/ISLispHyperDraft/islisp-v23.html#s_with_handler)
|
||||||
|
|
||||||
|
[^1]: These variable names were changed to accommodate gmnlisp v0.7.10 and later, in which symbol names are case-insensitive. The new format avoids potential name conflicts.
|
||||||
|
|
||||||
Other functions are defined on [ISLisp]
|
Other functions are defined on [ISLisp]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user