Repository navigation
Commit 945f1f3
committed
interp: implement the enable, compgen, history and logout builtins
enable -n disables a builtin so the name falls through to the exec
handler, which is the point of the builtin in bash too — running the
real /bin/echo, say. `builtin` still bypasses that, as it does in bash,
and subshells inherit the set of disabled builtins.
compgen generates completions from the shell's own aliases, functions,
variables, keywords and $PATH — the interpreter is the only thing that
knows them, so a line editor above it had no way to ask before. The -A
job and -A signal actions yield nothing for now; they fill in when the
job control builtins land.
history reads the list the embedder supplies with the new
interp.History option, since the interpreter never reads input lines
itself and so has no history of its own. logout is bash's error for a
shell that is not a login shell.1 parent 9a79a44 commit 945f1f3
6 files changed
Lines changed: 549 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
237 | 247 | | |
238 | 248 | | |
239 | 249 | | |
| |||
476 | 486 | | |
477 | 487 | | |
478 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
479 | 503 | | |
480 | 504 | | |
481 | 505 | | |
| |||
1023 | 1047 | | |
1024 | 1048 | | |
1025 | 1049 | | |
| 1050 | + | |
| 1051 | + | |
1026 | 1052 | | |
1027 | 1053 | | |
1028 | 1054 | | |
| |||
1301 | 1327 | | |
1302 | 1328 | | |
1303 | 1329 | | |
| 1330 | + | |
| 1331 | + | |
1304 | 1332 | | |
1305 | 1333 | | |
1306 | 1334 | | |
| 1335 | + | |
1307 | 1336 | | |
1308 | 1337 | | |
1309 | 1338 | | |
| |||
0 commit comments