skalman
skalman is moonshot's command line. it reads a line of keystrokes, echoes them to the screen and on Enter runs the named command. there is one shell session per kakel window, so a half-typed command survives switching focus away and back, and a command's output lands in the window it was typed in.
editing a line
the arrow keys move within the line and up and down go through the history. home
and end, or ctrl-a and ctrl-e, jump to the start and end,
ctrl-w deletes the word before the cursor and ctrl-k the rest
of the line. tab completes a command name or, after the first word, a file name,
and a second tab lists the candidates. double quotes keep spaces inside one
argument, as in write "my file.txt" hello.
command reference
type help for the current list, or help (command) for what one
command takes and does. arguments are written in parentheses, and optional ones in
brackets. every path may contain slashes.
- help [command]
- shows the full command list, or what one command takes and does.
- clear
- clears the focused window.
- echo (text)
- prints its argument back.
echo --file (path)prints a file's contents. - list (path)
- shows the contents of a directory, with sizes and permissions.
- change (path)
- changes the current working directory.
- make (name)
- creates an empty file (name with a dot) or directory.
- remove (name)
- deletes a file or empty directory.
- write (name) (text)
- writes text into a file, creating it if needed.
- copy (src) (dst)
- copies a file. both paths may contain slashes.
- rename (src) (dst)
- renames or moves a file or directory across directories.
- count (file)
- prints lines, words, and bytes in a file.
- where
- prints the current working directory path.
- sync
- persists all files to disk.
- mode (path) (level)
- sets file permissions to
public,private, orlocked. - own (path) (user)
- changes a file's owner.
- whoami
- prints the current user name.
- login (name)
- switches user for this session, with optional password.
- passwd (user) (password)
- sets or changes a user's password.
- adduser (name)
- creates a new user. the user table is fixed-size.
- eval (expr)
- evaluates a c0 expression through the repl.
eval -cuses the jit compiler. - interpret (file)
- runs a c0 source file line by line through the repl interpreter.
- edit (file)
- opens a file in the skrift text editor.
- draw (file) [size]
- opens a sprite in the pensel pixel editor.
- start (program) [arguments]
- runs a program from jakel in ring 3,
in a kakel window of its own. the words
after the name are its arguments, so
start lira.elf mysong.notopens that song. - tasks
- lists every task in the scheduler table.
- kill (id)
- stops a task by the id
tasksshows. - split
- adds a new window to the grid, logged in as the same user.
- close
- removes the focused window, and stops the program in a
tavla.
alt+wdoes the same.
the repl
eval (expr) runs c0 statements through an interpreter, with variables
that last for the session, if and else, while and for loops, and
print(). eval -c compiles them to machine code with the
jit instead. interpret demo.c0
runs the demo file seeded on first boot.
users
root and guest exist from the first boot, and raket
asks for a login in every new session. adduser, passwd and
login manage users, and own and mode set a
file's owner and whether it is public, private or locked.