Library that provides a bash-like command line interface for C++ programs.
Find a file
2018-12-27 13:35:54 +01:00
aur Snippet and aur PKGBUILD are now in the main repository 2016-05-29 16:45:34 +02:00
library Corrected CMakeLists.txt for new directory structure. Corrected snippet for the same reason. 2017-01-03 18:21:29 +01:00
snippet Corrected CMakeLists.txt for new directory structure. Corrected snippet for the same reason. 2017-01-03 18:21:29 +01:00
.gitignore Renamed some functions and variables in SIGINT handling. README updated. Removed "using" directives in the headers. Input, output and error streams are now fields 2016-04-23 13:03:53 +02:00
license.md Corrected license 2017-01-03 18:24:08 +01:00
README.md Updated README 2018-12-27 13:35:54 +01:00

msh-console

Library that provides a bash-like command line interface for C++ programs.

Abandoned

This was my first OOP project, so pardon the style and the conventions taken. This project is currently unmantained.

Features include:

  • flag handling implemented with popt.h;
  • creation of personalized commands in the same thread of the shell or in other threads;
  • basic shell functionalities, such as execution of other programs in the system. This is implemented with execvp().
  • piping, implemented with <unistd.h> pipe() function. Code based on https://stackoverflow.com/a/5207730.

What is not actually included:

  • advanced shell features, like:
    • redirection,
    • scripting,
    • command history.

Credits

Code based on "Write a Shell in C" tutorial by Stephen Brennan. The code contains stringtoargcargv.cpp, a set of functions written by Bernhard Eder here for parsing a string into argc and argv.

Compiling

The library can be compiled as shared library with the CMakeLists.txt file already in msh-console-library/.