Skip to content

hunee01/Karel-Code-SHell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Karel-Code-SHell

A toy command line shell based off Bash.
Made with minimal C experience, and originally on the CodeHS sandbox, hence the name!

All required scripts contained in the root karel folder.
Type 'help' for the list internally defined commands.

Any reported bugs would be greatly appreciated.
This is a beginner project, and I'll be glad to increase my skills through improvement.

A 'mens et manus' project
Thanks to Polecat and his 'feesh' for help and inspiration!

Image Source: CodeHS

Installation

Requirements

  • C compiler (e.g. gcc, clang, or tcc)
  • POSIX Environment (Linux, MacOS)
  • Standard C headers (no external libraries)

Build

$ cd karel
$ gcc main.c def_cmd.c -o kcsh # replace 'gcc' with 'clang' or 'tcc' depending on your compiler

From the root folder of the downloaded release.

Run

$ ./kcsh

If your compiler fails or warns about missing headers, please make sure you are on a POSIX compatible environment.

On Windows, try using WSL or MinGW, as native 32-bit and 64-bit Windows builds are not supported.

Help

List of internally defined commands

help - Shows a list of commands
cd [dir] - Goes to the specified directory (rather unstable)
pwd - Prints the current working directory
rm [-r --recursive] [location (dir if '-r'] - Deletes the specified file or empty directory
touch [location] - Creates or updates file at specified directory
rd [location] - Reads specified file
mkdir [dir] - Creates specified directory
whoami - Prints the current user
echo [args] - Prints the specified arguments
conf [-s --set -p --print] [setting] [val (if '-s')] - Used to view or edit values of settings in 'kcsh.json'

About

A toy command line shell based off Bash.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages