mk90.guide

Shell syntax

The actual command-line parser and dispatch rules.

Prompt and input

The prompt is the normalized current directory followed by $ . It starts as / $ . BK submits a line, backspace removes the previous character, and SU+C cancels the pending line.

The command line holds at most 95 characters plus a terminator. There is no history, cursor editing, completion or shell scripting language. Use EDIT to change a file.

Grammar

command-line = command [ "|" consumer ]
command      = name [ " " argument ] ...
consumer     = "cat" | "less"

Spaces split tokens; repeated spaces are skipped. A maximum of four tokens, including the command name, is retained on the producer or ordinary-command side. Additional tokens are silently ignored by the parser. Follow each command’s documented arity rather than relying on ignored arguments.

The single pipe is recognized even without surrounding spaces. The consumer must be bare CAT or LESS, with optional surrounding spaces and no arguments. More than one pipe, or a missing side, is invalid.

Case and paths

Registered command names and HELP topics are case-insensitive. Paths are case-sensitive: Note.txt and note.txt are different names. Use ASCII letters, digits, dot, hyphen and underscore in a component; the maximum is 12 characters.

Absolute paths start with /. Relative paths start at the current directory. ., .. and repeated slashes are normalized. No ~, home directory, PATH search or drive-letter alias is implemented.

Command and executable dispatch

A registered name selects its command record. CD runs in the shell itself. Other normal commands execute as PID 3 while PID 0 waits.

If the first token is not a registered name, the shell tries that token as an MBX executable path. It does not search a list of directories or infer a file extension. Prefer exec path.mbx or ./name.mbx for clarity. Arguments on the implicit executable form are not passed into BASIC.

run is reserved for the built-in COUNT and PULSE background workers. It does not execute a BAS file or an arbitrary application.

Syntax not implemented

Syntax0.6 behavior
QuotesNo quoting or grouping; quote marks are ordinary token characters.
BackslashNo escape sequences; it is a keyboard character, with V/N producing |.
> or >>No file redirection; these are ordinary token characters, not operators.
&No background operator.
; or && or ||No command lists or conditional execution. More than one | is rejected.
* or ?No wildcard expansion.
$NAME or $(...)No variables or command substitution.

Control-code overlap

The input interface exposes a small translated code set. Up-arrow and SU+C both produce code 3; down-arrow and SU+D both produce code 4. Consequently up-arrow also cancels a shell input line or a BASIC run, while down-arrow terminates standalone CAT /dev/console. The editor interprets codes 3 and 4 as vertical movement. These are actual 0.6 mappings, not a full terminal key protocol.