Commit graph

3 commits

Author SHA256 Message Date
817de694b0 Build the user commands with $BJO, after the start-up file
- The build runs $BJO, else bjo on PATH. A bjo that is not there gives a
  message that says what to set, and where.
- An interactive bjosh runs the start-up file first, and loads the user
  commands after it, so the file can set PATH or BJO.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:22:07 +01:00
bf961b12f9 Write the package of user commands on the first interactive start
When $XDG_CONFIG_HOME/bjosh/commands is not there, an interactive bjosh
writes it with the example, then builds and loads it. An empty directory
turns this off. --new-commands stays, for a start that is not interactive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:57:19 +01:00
84bd2f3382 Phase 4: commands in Bjolang
- A package of user commands in $XDG_CONFIG_HOME/bjosh/commands. Its
  module commands.bjo exports bjosh-extension: value commands, shell
  commands and a prompt function.
- (bjosh api): the types and functions a package imports.
- (bjosh user): builds the package when it is stale, and loads it with
  (std plugin) at each start. `reload` builds and loads it again.
- bjosh --new-commands writes a package with an example.
- No Native AOT, because it cannot load modules. bin/bjosh starts
  src/main.exe.
- tests/extension.bjo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:38:40 +01:00