Skip to content
/ Fish Public

Fish is a lightweight shell client built in C++ capable of interpreting a variety of shell commands and managing both external programs and built-in shell functionalities.

Notifications You must be signed in to change notification settings

Ashfinn/Fish

Repository files navigation

Fish

A Shell Client built in C++

progress-banner

This repository contains Fish, a POSIX-compliant shell client built in C++ as part of the Codecrafters "Build Your Own Shell" Challenge. The shell is capable of interpreting shell commands, running external programs, and handling built-in commands like cd, pwd, echo, and more.

Forks Stargazers Issues

About The Project

Fish is designed to be a lightweight and simple shell client built in C++ that complies with POSIX standards. It is capable of interpreting a variety of shell commands and managing both external programs and built-in shell functionalities.

Key features include:

  • Running external programs.
  • Built-in commands like cd, pwd, echo, and more.
  • Learning about shell command parsing and REPL loops.

(back to top)

Built With

The project uses the following tools and libraries:

  • C++
  • POSIX standard for shell compliance

(back to top)

Getting Started

To get started with Fish locally, follow the steps below.

Prerequisites

Ensure you have the following installed on your system:

  • GCC (or any C++ compiler)
  • Make (optional, for easier build management)

Installation

  1. Clone the repository:
    git clone https://github.com/Ashfinn/fish.git
  2. Navigate to the project directory:
    cd fish
  3. Compile the source code:
    g++ -o fish_shell main.cpp
  4. Run the shell:
    ./fish

(back to top)

Usage

Once the shell is running, you can execute common shell commands such as:

  • pwd - Print the current directory.
  • cd - Change directory.
  • echo - Output text to the terminal.
  • Run external programs like ls, cat, etc.

You can type commands directly into the Fish shell, just as you would in a standard Unix shell.

For more usage examples, please refer to the Documentation

(back to top)

Roadmap

  • Add basic command parsing and execution
  • Add built-in commands (cd, pwd, echo)
  • Improve error handling and edge case support
  • Support piping and redirection
  • Add support for multi-command execution (using &&, ||)
  • Add additional features like scripting support

(back to top)

Contributing

Contributions are welcome! If you have ideas to improve Fish, feel free to fork the repo and create a pull request. Here’s how:

  1. Fork the repository
  2. Create a new feature branch (git checkout -b feature/newFeature)
  3. Commit your changes (git commit -m 'Add some newFeature')
  4. Push to the branch (git push origin feature/newFeature)
  5. Open a pull request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Acknowledgments

(back to top)

About

Fish is a lightweight shell client built in C++ capable of interpreting a variety of shell commands and managing both external programs and built-in shell functionalities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published