chiark
/
gitweb
/
~mdw
/
runlisp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README.org: Clarify and fix the discussion of `-p', mentioning `-d'.
[runlisp]
/
README.org
diff --git
a/README.org
b/README.org
index 30aab1f9359496ed360eb0f91c69d175a7dacede..b59221a2d9d8dc8bc955daa076e04acd69a35c8f 100644
(file)
--- a/
README.org
+++ b/
README.org
@@
-151,20
+151,28
@@
command-line interface for evaluating Lisp forms. For example:
: 3
If your build script needs to get information out of Lisp, then wrapping
: 3
If your build script needs to get information out of Lisp, then wrapping
-~format~, or even ~prin
1
~, around forms is annoying; so ~runlisp~ has a
+~format~, or even ~prin
c
~, around forms is annoying; so ~runlisp~ has a
~-p~ option which prints the values of the forms it evaluates.
: $ runlisp -e '(+ 1 2)'
: 3
~-p~ option which prints the values of the forms it evaluates.
: $ runlisp -e '(+ 1 2)'
: 3
-If a form produces multiple values, then ~-p~ will print all of them
-separated by spaces, on a single line:
+If a form produces multiple values, then ~-p~ will print all of them
, as
+
if by ~princ~,
separated by spaces, on a single line:
: $ runlisp -p '(floor 5 2)'
: 2 1
: $ runlisp -p '(floor 5 2)'
: 2 1
+There's also a ~-d~ option, which does the same thing as ~-p~, only it
+prints values as if by ~prin1~. For example,
+
+: $ runlisp -p '"Hello, world!"'
+: Hello, world!
+: runlisp -d '"Hello, world!"'
+: "Hello, world!"
+
In addition to evaluating forms with ~-e~, and printing their values
In addition to evaluating forms with ~-e~, and printing their values
-with ~-p~, you can also load a file of Lisp code using ~-l~.
+with ~-
d~ and ~-
p~, you can also load a file of Lisp code using ~-l~.
When ~runlisp~ is acting on ~-e~, ~-p~, and/or ~-l~ options, it's said
to be running in /eval/ mode, rather than its usual /script/ mode. In
When ~runlisp~ is acting on ~-e~, ~-p~, and/or ~-l~ options, it's said
to be running in /eval/ mode, rather than its usual /script/ mode. In