ela
Contents

ManualShell

Doctor

In the terminalela --spec doctor

ela --doctor checks the shell's setup without starting it, one line a check, ok, warn or FAIL with what to do:

CheckPasses when
initinit.ela is absent, or a regular file that parses and declares cleanly: no alias named after a built-in, history_size from 1 to 100,000, procs, structs, enums and imports the shell accepts, and a prompt proc that takes no parameters
loginlogin.ela is absent, none; a login shell reads ~/.config/ela/login.ela, or a regular file that parses and declares cleanly; the line says what it sets, env lines, env.from_bash lines, umask, ulimit and procs, and how many commands it runs at login, none of them run here. An alias in it is a warning, as a login shell that runs a script refuses one
historythe history's folder is writable, or can be made, and the file, when there is one, is a regular file you can read and write; the line gives its entries against the history's size
isoclinethe line editor's library is amber-isocline's, from /usr/lib/amber-isocline
pathPATH is set; a relative entry, which ela skips, is a warning
clockonly when ELA_CLOCK is set: virtual is a warning, since every time.sleep then returns at once (PACKAGES.md, The virtual clock), and any other value a failure
progressonly when ELA_NO_PROGRESS is set to anything but empty: spin and progress then draw nothing (LANGUAGE.md, Progress and spinners)
librariesalways: the library folders that exist, in the order a lib: import searches them, each with how many .ela files it holds, folders below it counted, and never their names: libraries: ~/.local/share/ela/lib 3 files, /usr/share/ela/lib 12 files. With none, where ela looks: libraries: none yet; ela looks in ~/.local/share/ela/lib, /usr/local/share/ela/lib, /usr/share/ela/lib
keyringthe desktop keyring keyring.* reads is unlocked, keyring: unlocked, or locked, keyring: locked; it unlocks at first use, when the desktop asks for its password. With no session bus, as in an ssh session or cron, or no secret service answering on it within 5 seconds, it is a warning: keyring.* is unavailable there, and a secret comes in an environment variable instead. Without libsecret it fails, naming the package: sudo apt install libsecret-1-0

It exits 0 when every check passes, 1 when one fails, and 78 when init.ela does not parse or declares what the shell refuses, with the line and column. ela --doctor --json gives the same checks as JSON, each with its check, its result (ok, warn or fail) and its message, beside the status it exits with.

The doctor runs nothing in login.ela: not a command, umask, ulimit or env.from_bash's bash; it parses the file, declares what it declares and sorts its lines. Nor does it run anything in init.ela: it parses it, declares its procs, structs, enums and imports (an imported file holds declarations only), defines its aliases and applies a history_size given a number written out. Commands, assignments, blocks and other calls are counted and left alone, so a history_size worked out by an expression is not checked. It needs no terminal, writes nothing and makes no folder. The keyring's line asks the secret service whether its default collection is locked, and never lists or reads a secret, so a locked keyring shows no prompt; init.ela and the history file are classified before they are read, so a FIFO in their place never blocks it. Without libisocline ela does not start at all, and the loader names the missing library: sudo apt install amber-isocline.