A monolithic shell

This is a partially complete command shell. It was originally written to experiment with chroot-ed programs, and the restricted environment that programs run in; i.e. without normal access to shared library files, executable files like "ls" etc, unless they are copied into the chroot-ed tree.

dsh is intended to be statically linked (no shared library dependencies) and implements a variety of navigation commands internally.

cat     Display a file. Usage: cat file
cd      Change current working directory
help    Display help on all available commands
id      Display real and effective UIDs and GIDs
ls      List files [-l for details]. Usage: ls [-l] [directory]
man     (same as 'help')
prompt  Set the command line prompt. Usage: prompt NEWPROMPT
ps      Process status
pwd     Print current working directory
quit    Log out from this shell
su      Set user. Usage: su { uid N | euid N | gid N | egid N }
ver     Show shell version

It should be easy to extend, but I doubt whether anyone really has a use for a primitive non-programmable shell with a large footprint. Missing items include

[Source file]