diff --git a/README.md b/README.md index 741a163..18f2574 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,56 @@ To run the shell locally: ./apksh ``` +## Prerequisites + +To compile and run APKSH, you need: + +- GCC compiler +- readline library + +On Ubuntu or Debian-based systems, you can install these with: + +``` +sudo apt-get install gcc libreadline-dev +``` + +## Compilation + +To compile the shell, run: + +``` +gcc -o shell shell.c -lreadline +``` + +This will create an executable named `shell`. + +## Running the Shell + +To start the shell, run: + +``` +./shell +``` + +## Usage + +Once in the shell, you can use the following built-in commands: + +- `cd [directory]`: Change the current directory +- `pwd`: Print the current working directory +- `ls [directory]`: List contents of a directory +- `echo [text]`: Print text to the console +- `help`: Display help message with available commands +- `exit` or `bye`: Exit the shell + +You can also run any other commands available in your system PATH. + +Use the up and down arrow keys to navigate through command history, and use tab for auto-completion of commands and file paths. + +## History + +Command history is saved in `~/.apksh_history` and persists between sessions. + # Note If you are using a windows pc, you will have to first install WSL on your system and download an Ubuntu distro (or any other distro). Clone the repo in the WSL and run it in the linux environment