Commands that exist are blue and others red; arguments cyan, underlined
when they name a path that exists; quotes, variables, operators,
redirections and comments each have their color.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The editor suggests history lines whose command exists, cd lines by the
frecency of their directory, paths ignoring case, and the visited directory
that cd KEYWORD... goes to. Tab completes arguments with fish's completions
when fish is on PATH, and paths by the start of each part (~/P/B/B).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bjoterm is now a git dependency, at version 0.1.0 or later, pinned in
bjo.lock. So a clone of bjosh builds on any computer that has Bjolang.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- $(...) runs in a subshell. A word that is only an unquoted $(...) is
one word per line. X=$(cmd) sets $? to its status.
- alias, unalias, and command NAME. An alias is one pipe.
- ~/.config/bjosh/rc runs before the first prompt.
- PROMPT, expanded as in double quotes, with \w \W \u \h \$ \e \n.
- "Done" lines are written above the input while the prompt waits.
- >&2, for programs and value commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Values are Json of (text json); a record is JsonFields.
- Value commands: files, procs, open, where, select, get, sort-by,
first, last, count, reverse, uniq, lines, from-json, to-json,
from-csv, to-csv, each with a short name.
- Value commands next to each other run as one unit: a (std run)
filter in a job, or in the shell when a line has no program.
- Records are shown as a table; values go to programs as lines.
- A name is a shell command, a short name, a program on PATH, then a
long name.
- 2>&1, with >FILE 2>&1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- (bjosh syntax): a part of POSIX sh, parsed with (text
parser-combinators). Syntax that is not supported raises an error that
names it.
- (bjosh expand): variables, ~ and globs. Values are not split.
- (bjosh exec): pipes as (std run) jobs, && || ; &, redirections, and
NAME=value through env.
- (bjosh shell) and (bjosh builtins): the job table and cd, pwd, exit,
export, unset, jobs, fg, bg, kill, type, help, history.
- (bjosh editor): Enter waits for open quotes and trailing operators;
completion of commands and files.
- -c LINE, FILE, and stdin. A Native AOT build too.
- Tests: the parser, expansion, the editor, lines through -c, and job
control under script.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>