Home/Modules/sleela-terminal

sleela-terminal

system module sleela-terminal

<img align="right" src="https://github.com/mearvk/SLeeLa/blob/master/images/debian/debian-logo.png" width="75" height="75" alt="SLeeLa">

<img src="https://github.com/mearvk/SLeeLa/blob/master/images/sleela/sleela-logo-004.jpg" alt="SLeeLa">

sleela-terminal — the SleelaTerminal™ shell

SleelaTerminal™ is an original command shell authored by the SLeeLa project — a clean-room implementation guided by public POSIX-shell specifications, not derived from GNU Bash or any other shell's source (see NOTICE). It aims at the same excellent capabilities as a mature shell, expressed through our own hierarchical, math-driven architecture (see ARCHITECTURE.md).

This is authored, so it is ours to brand. The ideas (pipelines, redirection, quoting, arithmetic) are common shell knowledge; the code is new. The repository's vendored GNU Bash under bash/ is a separate, unmodified component and is not used here.

Layers

A strict downward-only dependency stack:

L6  CLI / M5          slsh + select/process-substitution/trap orchestration
L5  Executor          pipelines, redirections, control flow, builtins
L4  Expansion         variables, arithmetic $(( )), quote removal
L3  Parser             tokens -> AST (recursive descent)
L2  Lexer              text -> tokens (quoting, operators, comments)
L1  Core + Arith       Value/Token/AST model, precedence-climbing arithmetic

Features (M1 – M5)

M1 — the core:

M2 — control, functions, expansion:

M3 — expansion depth, here-docs, pipeline functions:

M4 — loops, jobs, conditional builtins:

M5 — shell interaction and process integration:

Soros relative time

The base binary set includes the project-defined soros time command. It uses the terminal's local civil year as its input and applies this explicit relative time rule:

The command is available directly in the REPL and through slsh -c / script execution:

./build/slsh -c 'soros time'

The implementation deliberately uses the terminal's local civil year rather than claiming that this project-defined notation replaces a civil calendar.

See M5-HARDENING.md for the implementation closeout and remaining gates toward the GREAT engineering classification.

Interactive prompt and help

The interactive prompt defaults to the account username followed by $ (for example, ada$). Run help for the feature index or help expansion, help jobs, help process, help traps, help select, help prompt, help soros, help portability, or help build for topic-specific guidance. The help text also calls out known conformance and platform limitations.

Build & run

cd sleela-terminal
make                       # builds ./build/slsh and the smoke test
make smoke                 # run the layered smoke test
./m5-smoke.sh              # run the M5 integration smoke tests after building

./build/slsh -c 'echo hello | tr a-z A-Z'
./build/slsh -c 'x=3; echo $(( x * x + 1 ))'
./build/slsh -c 'for i in a b c; do echo $i; done'
./build/slsh -c 'greet() { echo Hi, $1; }; greet Ada'
./build/slsh -c 'case $(echo cat) in cat|dog) echo pet;; esac'
./build/slsh -c 'for f in */include/*.hpp; do echo "$f"; done'
./build/slsh -c 'echo report{1..3}.txt; echo {dev,prod}-{a,b}'
./build/slsh -c 'up() { tr a-z A-Z; }; echo hi | up'
printf 'cat <<END\nyear $(( 2000 + 25 ))\nEND\n' | ./build/slsh /dev/stdin
./build/slsh -c 'n=0; until [ $n -ge 3 ]; do echo $n; n=$(( n + 1 )); done'
./build/slsh -c 'if ! [ -f /no/such ]; then echo missing; fi'
./build/slsh -c 'sleep 1 & jobs; wait; echo done'
printf 'ada 42\n' | ./build/slsh -c 'read name age; echo "$name is $age"'
printf '1\n' | ./build/slsh -c 'PS3="pick> "; select x in alpha beta; do echo "$x:$REPLY"; break; done'
printf '%s\n' 'cat <(printf hi)' | ./build/slsh
./build/slsh script.slsh
./build/slsh

Files

FileLayerWhat it is
ARCHITECTURE.md—Hierarchical, math-driven design.
M5-HARDENING.md—M5 hardening, validation, regression baseline, and release gates.
PERFORMANCE.md—Performance, security, validation, and engineering classification reference.
core.hppL1Value, Token, AST, Environment.
arith.hpp / arith.cppL1Precedence-climbing arithmetic engine.
lexer.hpp / lexer.cppL2Text → tokens.
parser.hpp / parser.cppL3Tokens → AST.
expand.hpp / expand.cppL4Word expansion and pathname globbing.
executor.hpp / executor.cppL5Run the AST + builtins.
m5.hpp / m5.cppM5Select, process substitution, and signal-trap orchestration.
slsh.cppL6CLI / REPL driver and M5 entry point.
smoke.cpptestExisting layered smoke test.
m5-smoke.shtestM5 integration and security regression smoke test.
fuzz.cpptestBounded Clang/libFuzzer lexer/parser harness.
Makefile—Self-contained build and validation targets.
NOTICE—Original-authorship statement.

Original SleelaTerminal™ work. Behaviour targets public POSIX-shell specifications; no shell source was copied.

Footerbar topic news feed

Configure the footerbar from the shell with footerbar chemistry, footerbar pharmacology, or footerbar chemistry pharmacology to select one or multiple topics. Use footerbar list to see the 100-term catalog, footerbar status to inspect the saved selection, and footerbar clear to disable it. The GUI polls for changes and displays RSS headlines for the selected topics. See FOOTERBAR-TOPICS.md.

Interactive Tab completion

In an interactive terminal, press Tab to complete a command from shell builtins and executable programs on PATH, or to complete a file or directory name. A unique directory completion keeps a trailing slash; a unique command/file completion adds a space. When several names match, Tab expands their shared prefix; pressing Tab again lists the matching candidates. Hidden files are offered when the typed prefix begins with a dot. Completion is part of the CLI line editor and does not change non-interactive script input.

The footer ticker uses a slightly grey text colour with a 1px pure-white text outline. In Settings → Footer ticker, choose when rightward scrolling starts: 5, 10, 15, 30, 45, or 60 minutes after the current footer message appears. The preference is saved in the user configuration. RSS searches request the past day of stories and display up to eight headlines. When a topic feed is enabled, SleelaTerminal refreshes every 15 minutes from 9:00 AM through 4:59 PM local time, and hourly outside that workday window. Feed updates require network access and curl.


SLeeLa

<p align="center"><img src="images/sleela/sleela-wordmark.svg" alt="SLeeLa — The Now. The Ingredient." width="560"></p> <p align="center"><img src="https://github.com/mearvk/SLeeLa/blob/master/images/sleela-programming-language-002.jpg" alt="SLeeLa Marketing Logo" width="560"></p>

Files 37