aboutsummaryrefslogtreecommitdiff
path: root/api/builtins.yaml
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-21 14:45:39 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-21 14:45:39 -0400
commit6ee5af0a16a5f1a32eb933e30d8b86ff4e691beb (patch)
treea4ccc48bef576be1cfd4d30342eebc684474e8f5 /api/builtins.yaml
parent868ca31562dcc5d484d8f015adfa173c0a43c415 (diff)
Add short descriptions for API methods to improve manpages
Diffstat (limited to 'api/builtins.yaml')
-rw-r--r--api/builtins.yaml9
1 files changed, 9 insertions, 0 deletions
diff --git a/api/builtins.yaml b/api/builtins.yaml
index 269380ca..6bb6d762 100644
--- a/api/builtins.yaml
+++ b/api/builtins.yaml
@@ -1,4 +1,5 @@
ask:
+ short: get user input
description: >
Gets a line of user input text with a prompt.
note: >
@@ -34,6 +35,7 @@ ask:
= "Arthur Dent"
exit:
+ short: exit the program
description: >
Exits the program with a given status and optionally prints a message.
return:
@@ -56,6 +58,7 @@ exit:
exit(status=1, "Goodbye forever!")
getenv:
+ short: get an environment variable
description: >
Gets an environment variable.
return:
@@ -72,6 +75,7 @@ getenv:
= "xterm-256color"?
print:
+ short: print some text
description: >
Prints a message to the console (alias for say()).
return:
@@ -93,6 +97,7 @@ print:
print("world!")
say:
+ short: print some text
description: >
Prints a message to the console.
return:
@@ -114,6 +119,7 @@ say:
say("world!")
setenv:
+ short: set an environment variable
description: >
Sets an environment variable.
return:
@@ -133,6 +139,7 @@ setenv:
setenv("FOOBAR", "xyz")
sleep:
+ short: wait for an interval
description: >
Pause execution for a given number of seconds.
return:
@@ -148,6 +155,7 @@ sleep:
sleep(1.5)
fail:
+ short: abort the program
description: >
Prints a message to the console, aborts the program, and prints a stack trace.
return:
@@ -163,6 +171,7 @@ fail:
fail("Oh no!")
USE_COLOR:
+ short: whether to use colors
type: Bool
description: >
Whether or not the console prefers ANSI color escape sequences in the output.