This page is "http://www.cs.tut.fi/~albert/BOAR/shell.html".

Shell Manual

Features

Prompt

%S	- Current directory
%D	- The last component of the current directory
%d	- The last two path components of the current directory
%N	- Process number

\e	- ESC
\n	- newline
\r	- carriage return
\t	- TAB
\a	- BEL

^*	- ctrl-character * (e.g. ^@ NUL, ^g BEL)
e.g. set prompt "%N. \\e[42;33m%d\\e[0m » "

Default prompt is "%N.%S» ", in case the prompt-variable is not set.

Internal commands

ALIAS
Usage: alias [«alias name» [«alias contents»]]

Display or create aliases. Without arguments alias displays all aliases and their definitions. With one argument the corresponding alias is displayed. With two arguments a new alias is created.

e.g. alias cp copy

ASSIGN
Usage: assign [«name:» [ ( [REMOVE] | directory [(LATE | ADD)] ) ] ]

Displays, creates or deletes assigns (logical names pointing to files or directories). Assign without any arguments displays all assigns. With the LATE option you can do a late-binding assign which is resolved only when the assign is first accessed. When using ADD the directory is added to the assign list (the previous directory is preserved). Currently multiassigns are not used, but they are there..

e.g. assign foo: rom:testdir

AVAIL
Usage: avail

Displays free memory.

CD
Usage: cd [«directory»]

Change the working directory to the specified directory. The directory needs to have execute-permissions.

CHMOD
Usage: chmod [ugo][+-=][hsparwed] «files»

Change the permission bits of files and/or directories.

	ugo	- group of bits to change (user, group, others)
		  default is user
	=+-	- toggle (=), set (+) or clear (-) bits
	rwed	- Read, Write, Execute and Delete flags
	hspa	- Hidden, Script, Pure and Archive flags
These groups can be repeated any number of times to produce the desired results.

e.g. chmod +rwed-ago-rwed myfile

Will set user RWED for "myfile" and simultaneously remove the Archive flag and RWED bits for group and other users.

The resulting masks are applied to the original protection bits in the order: toggle, set and clear. You can get some pretty confusing results if you toggle, set and clear the same bit. You will notice that the bit will always get cleared in this case, because the clear mask is applied last. The cause for this is simple: it is only necessary to calculate the three mask values once and they can be applied to each file that comes along. If you want to be sure you get what you mean, group the changes in the command line in the same order (toggle, set, clear).

«files» can be any number and combination of files and directories. CHMOD will echo the file names and resulting file permissions to the standard error stream.

COPY
Usage: copy «file» «newfile»

Copies files. File comments and protections are copied, but you own the new file.

ECHO
Usage: echo [-n] [«words»] [NOLINE]

Writes all arguments to the standard output without commenting whether they are correct or not. If the first parameter is "-n" or the last one is "NOLINE", no newline is appended. ("-n" is case-sensitive, "NOLINE" is not)

e.g. echo "World is flat." "Earth orbits the sun!"

FILENOTE
Usage: filenote «files» «filenote»

Change the comment field of files and/or directories. «files» can be any number and combination of files and directories.

FORMAT
Usage: format «disk:»

Format a disk. Only the owner of a disk can format it. Also, the handler must know about the action.

INFO
Usage: info

Show information about mounted disks and other handlers. Disk name, size, usage and block size is displayed.

INTERNAL
Usage: internal

Lists all internal commands.

LOGIN
Usage: login «uid» [«gid»]

Change the owner of the shell. Obviously this command will be removed and a login procedure with passwords added later..

LS
Usage: ls [-d] [«files»]

Show the contents of directories. With the -d option you get the info about the directory itself, not just about its contents.

MKDIR
Usage: mkdir «names»

Creates directories. Mkdir will only create new directories in existing directories. You need to have write permissions in the parent directory.

PATH
Usage: path [«directories» | RESET]

Displays, adds to or resets the command search path. Without any arguments path displays the directories in the search path.

REHASH
Usage: rehash

Will search the path and update the command-completion cache.

Rehash should be run after path changes so that the commandname completion will work correctly. If rehash is not run on shell startup, it is run automatically when the command-completion (or command-completion listing) is first used. Path changes do not automatically invalidate the cached data.

RELABEL
Usage: relabel «disk:» «newname»

Sets a new logical name for a disk.

RENAME
Usage: rename «oldname» «newname»

Renames files. Currently does not work across devices, but you can move a file or directory to anywhere inside the same device.

RESET
Usage: reset

Resets BOAR by disallowing interrupts for too long. Obviously this command will also be removed in the future.

RM
Usage: rm «files»

Deletes one or more files or directories. You can only delete the ones that have delete permissions, are not in use and, in the case of directories, are empty.

SEND
Usage: send «file»

Send a file. Use ^V in the terminal program to receive it.

SET
Usage: set [ «varname» [ «definition» ] ]

Display or set variables (local, but inherited). Without any arguments all variables are displayed. With one argument only that variable is displayed and with two arguments the variable is set.

TOP
Usage: top

Displays tasks/processes running/waiting in the system. Press any key to end the display.

TYPE
Usage: type «files» [HEX]

Displays the files specified. If the HEX option is specified, will display the files in hexadecimal format.

UNALIAS
Usage: unalias «aliases»

Removes one or more aliases.

UNSET
Usage: unset «variables»

Removes one or more variables.

WHICH
Usage: which «commands»

Show which version of command is executed.

The output may list one or more of these:

After this the path is searched and the paths of the matching commands are displayed.

«commands» can be any number of command names (wildcard expressions are not currently handled).

Command search order

All commands with absolute or relative paths are found directly (or maybe not) and executed. If the path points to a directory, auto-cd-operation is performed. If no path is specified, the command is searched in the following order:

  1. Shell internal command (list with "internal")
  2. Resident command
  3. Resident command with ".b68k" added to the name
  4. Executable or script file in the current working directory
  5. Directory in the current working directory
  6. Executable or script file in path

Command Line Editing

The Shell line editing is only used on interactive devices. The command line editor has two modes depending on the 'term' environmental variable (vt100 or ANSI). In ANSI-mode it sends more bytes, so vt100-mode is recommended. Just make sure that your emulation matches the setting. It seems that most vt100-terminals really don't like to work with the ansi-mode. A 'dumb' mode is also available, but it really throws characters at you and is dead slow on all important editing commands :-) The editor knows about these commands:

left/right ^B/^F	Moves cursor left and right
up/down    ^P/^N	Recalls history events
^A			Goto the start of line
^E			Goto the end of line
Backspace		Delete previous character
Delete			Delete current (next) character
^D			Like Delete or display matching
			files/commands if cursor is at EOL
^L, ^R			Refresh line
^K			Delete to the end of line
^U			Delete to the start of line
^W			Delete previous word
^X			Delete line
^Y			Yank killed text back

TAB (^I)		Command/filename completion
Return/Newline (^J/^M)	End editing :-)

HELP			String assigned in variable HELP
F1			String in variable F1
 :			 :
 :			 :
F20			String in variable F20