Command line

Synopsis

Run shale with no arguments in a terminal to start an interactive session. The options run a single line instead, for programs and scripts that call Shale. shale --help prints this summary:

another shell
$ shale --help
-c runs /bin/sh -c for compatibility with programs that call your login shell. Use -e for Shale syntax.

Usage: shale [-l] [-c TEXT | -e TEXT | --help]
       shale --json -e TEXT
       shale --json --bash TEXT
  shale          Start an interactive Shale session on a terminal.
  -l             Use login invocation.
  -c TEXT        Pass TEXT unchanged to /bin/sh -c.
  -e TEXT        Evaluate one Shale line without an interactive session.
  --json -e TEXT     Run Shale syntax and print one JSON outcome.
  --json --bash TEXT Run unchanged text through /bin/bash and print one JSON outcome.
  --help         Show this help.

Run Sigil scripts with sigil FILE.sgl.

Options

Option

What it does

-l

Start as a login shell. Shale also does this when the name it was started under begins with a dash, the way login programs start a shell. A login shell with no terminal exits at once with status 0.

-c TEXT

Pass TEXT unchanged to /bin/sh -c and exit with its status. This is for programs that run commands through your login shell, which expect POSIX shell syntax.

-e TEXT

Run TEXT as one line of Shale, with your configuration, and exit with its status.

--json -e TEXT

Run TEXT as one line of Shale and print the outcome as one JSON object.

--json --bash TEXT

Run TEXT unchanged through Bash and print the outcome as one JSON object.

--help

Print the summary above.

Any other arguments print a short message and exit with status 2. To run a Sigil script, use sigil FILE.sgl; Shale outside the prompt covers all of these in more detail.

Files

File

What it holds

~/.config/shale/config.sgl

Your configuration. See Configuration.

~/.config/shale/local.sgl

More configuration, read after config.sgl.

~/.local/state/shale/history.db

Your command history, shared by every Shale you run. It keeps about the last 50,000 lines.

Shale uses $XDG_CONFIG_HOME/shale and $XDG_STATE_HOME/shale instead when those variables are set to absolute paths.