#1401·sh

interp: several bash builtins are recognized but unimplemented

Author: 0pcomCreated Aug 18, 2026Updated Aug 18, 2026

Filing per the contributing guidelines, to accompany PRs #1381 and #1382 which are already open.

What is missing

IsBuiltin reports these as builtins, and the parser accepts them, but interp does not implement them — a script using one gets "not found" or silence rather than the behaviour bash has:

help, times, umask, jobs, fg, bg, kill, disown, enable, compgen, history, logout

Why it matters here

The motivating case is a shell that has no host to fall back on: an interpreter compiled to WebAssembly and driven from a terminal in the browser, where there is no /bin to find an external command in. Whatever interp does not implement simply does not exist for that user. help is the sharpest example — a shell that cannot list its own builtins is hard to explore — but the job-control set matters too, since background commands are the one place where a browser shell behaves least like a terminal.

What the PRs do

#1381help, times, umask. help follows bash: two-column listing, help NAME, globs, and -d/-s/-m. Builtins recognized but unimplemented are starred, the way bash stars disabled ones, so the output is an honest statement of what this shell can do.

#1382 — job control over the interpreter's background shells (jobs, fg, bg, kill, disown), plus enable, compgen and history.

Some of these cannot mean quite the same thing here as in bash, and the PRs say so rather than pretending otherwise: a job is a goroutine rather than a process, so kill cancels its context and nothing is ever stopped; there is no controlling terminal, so fg waits for a job and returns its status; history belongs to whatever line editor sits above the interpreter, so it has to be supplied.

On scope

Splitting these differently, or taking only some, is entirely reasonable — help and umask stand alone, whereas the job-control set only makes sense together. Happy to reshape or drop any of it.