- Install go in your system
- Run go mod tidy
- Run the file using go run ./cmd/...
- Download the executable file 'gosh'
- Run the file using ./gosh (for mac/linux) or ./gosh.exe (for windows)
- exit - to exit the shell
- echo [text] - prints the input to the console
- type [command] - tells if the command is a built-in or external command
- pwd - prints the present working directory
- cd [path] - changes the directory to path provided
You can also run external commands that you have added to your path.
- ls - lists the files in the current directory
- cat [file] - prints the content of the file to the console
- mkdir [dir] - creates a new directory
- clear - clears the console
- Support for piping commands (echo "Hello" | wc)
- I/O redirection (echo "Hello" > file.txt)
- Environment variable expansion using $ (echo $ENV)
- Export built-in command (export ENV=value)
- Background processes using & (echo "Hello" &)
- Command history (up/down arrows)
- Tab completion