Builtins and comma commands
BuiltinsPermalink to Builtins#
A builtin is a command Shale runs itself instead of starting a program, because it changes Shale's own state: its directory, its environment or its jobs. When a builtin and a program have the same name, the builtin wins.
A builtin has to be a command of its own. You can't pipe into or out of one, redirect it, start it with & or put NAME=value in front of it; Shale says so if you try. &&, || and ; work, since each side is still a command of its own.
Builtin | What it does |
|---|---|
| Change to DIRECTORY, or to your home directory with no argument. |
| Set environment variables for Shale and every program it starts. With no arguments, print the whole environment, one |
| Remove environment variables. |
| List the jobs Shale is running, with their number, state and command line. |
| Bring job N to the foreground, or the newest job with no argument. A stopped job continues. |
| Let stopped job N continue in the background, or the newest job with no argument. |
| Ask job N to stop by sending it SIGTERM. A stopped job is continued so it can receive the signal. |
| Leave Shale with STATUS, from 0 to 255, or with the status of the last command when you don't give one. |
To see the job builtins in a session, read Jobs and outcomes.
Comma commandsPermalink to Comma commands#
A line that starts with a comma and one of these names runs the command instead of evaluating Sigil. Three are Shale's own; the rest come from Sigil's REPL, and ,help lists them.
Command | What it does |
|---|---|
| Show the outcome of the last command you ran in the foreground: the program's name, or |
| Read your configuration again now, instead of waiting for the next prompt. |
| Inspect the last Sigil error, at a |
| Show the documentation for a Sigil procedure or variable. |
| Search Sigil's procedures by name or description. |
| Import a library into the session, such as |
| Switch the session to another module, such as |
| Load a Sigil file into the session. |
| List the commands that come from Sigil's REPL. |
| Leave Shale, like |