Giter Club home page Giter Club logo

shelley's People

Contributors

pileon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

waffle-iron

shelley's Issues

Design

Design, requirements, use-cases or user stories, initial milestones.

don't compile on Debian/x86-64 trxie

after

  git clone [email protected]:pileon/shelley.git
  mkdir _Build
  cd _Build
  cmake ..
  make

[ 33%] Building CXX object src/CMakeFiles/shelley.dir/shelley.cpp.o
/usr/src/Shells/shelley/src/shelley.cpp: In function ‘void {anonymous}::execute_command(const command&)’:
/usr/src/Shells/shelley/src/shelley.cpp:49:59: error: ‘strerror’ was not declared in this scope; did you mean ‘stderr’?
49 | std::cerr << "shelley: " << cmd[0] << ": " << strerror(errno) << '\n';
| ^~~~~~~~
| stderr
/usr/src/Shells/shelley/src/shelley.cpp: In function ‘void {anonymous}::wait()’:
/usr/src/Shells/shelley/src/shelley.cpp:57:81: error: ‘strerror’ was not declared in this scope; did you mean ‘stderr’?
57 | std::cerr << "Error waiting for child process: " << errno << ' ' << strerror(errno) << '\n';
| ^~~~~~~~
| stderr
/usr/src/Shells/shelley/src/shelley.cpp: In function ‘void {anonymous}::process_commands(const std::vector<std::vector<std::__cxx11::basic_string > >&)’:
/usr/src/Shells/shelley/src/shelley.cpp:81:75: error: ‘strerror’ was not declared in this scope; did you mean ‘stderr’?
81 | std::cerr << "Error forking process: " << errno << ' ' << strerror(errno) << '\n';
| ^~~~~~~~
| stderr
make[2]: *** [src/CMakeFiles/shelley.dir/build.make:76: src/CMakeFiles/shelley.dir/shelley.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: src/CMakeFiles/shelley.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Unit-testing

Add more unit-testing

Testing the functions in the utility namespace.
Testing get_input.

Testing the whole process-fork-wait mechanism is hard, as is the process-fork-exec mechanism.

Built-in commands

Check entered commands for built-in commands.

Currently will only support the cd command.

Code coverage

Add build-target to run code coverage using the unit-tests.

Tokenization of input into command and arguments

Will simply split on white-space.

  1. Multiple white-space are translated into a single space (' ').
  2. Store sub-strings into a collection
  3. The first element in the collection (at index 0) is the command

Handle special paths

Specifically handle tilde-paths, like e.g.

  • ~/path for paths relative to the users home directory
  • ~user/path for paths relative to another user

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.