Initial commit

This commit is contained in:
2024-12-02 06:30:40 +00:00
commit fd62fb822d
33 changed files with 1972 additions and 0 deletions

26
include/cmd/cmd_echo.hpp Normal file
View File

@ -0,0 +1,26 @@
#pragma once
#include "cmd/cmd_base.hpp"
namespace fsh {
class CmdEcho : public Command {
protected:
virtual void register_flags() override {
ArgFactory& factory = get_factory();
factory.add_input_rule();
}
virtual void run(std::istream& in, std::ostream& out, ArgManager& args) override {
std::string s;
std::string o;
while(getline(in, s)) {
o += s + "\n";
}
out << o;
}
};
}