Skip to content

Commit 125bddc

Browse files
committed
Add UPLINE character. Fixes #95
1 parent b906435 commit 125bddc

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

intro.md

+6
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ helpful for this sort of construction:
183183
QUOTE
184184
DQUOTE
185185
BQUOTE
186+
UPLINE
186187

187188
These all evaluate to atoms whose names are the unreadable characters,
188189
some of which may be helpful for text games and other diversions:
@@ -211,6 +212,11 @@ some of which may be helpful for text games and other diversions:
211212
()
212213
>
213214

215+
The `UPLINE` character, in particular, which moves the cursor to the
216+
beginning of the previous line, is useful for making command-line
217+
output which repeatedly updates the line in place, rather than
218+
printing multiple lines.
219+
214220
## Functions
215221

216222
Functions come in two flavors: temporary functions, called "lambda"

l1.md

+6
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ helpful for this sort of construction:
183183
QUOTE
184184
DQUOTE
185185
BQUOTE
186+
UPLINE
186187

187188
These all evaluate to atoms whose names are the unreadable characters,
188189
some of which may be helpful for text games and other diversions:
@@ -211,6 +212,11 @@ some of which may be helpful for text games and other diversions:
211212
()
212213
>
213214

215+
The `UPLINE` character, in particular, which moves the cursor to the
216+
beginning of the previous line, is useful for making command-line
217+
output which repeatedly updates the line in place, rather than
218+
printing multiple lines.
219+
214220
## Functions
215221

216222
Functions come in two flavors: temporary functions, called "lambda"

lisp/builtin.go

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func InitGlobals() Env {
3030
globals.Set("QUOTE", Atom{"'"})
3131
globals.Set("BQUOTE", Atom{"`"})
3232
globals.Set("DQUOTE", Atom{"\""})
33+
globals.Set("UPLINE", Atom{"\033[F"})
3334
return globals
3435
}
3536

0 commit comments

Comments
 (0)