Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,26 @@ find_package(pugixml REQUIRED)
# ============

set(XEUS_CPP_HEADERS
include/xeus-cpp/xbuffer.hpp
include/xeus-cpp/xeus_cpp_config.hpp
include/xeus-cpp/xholder.hpp
include/xeus-cpp/xinterpreter.hpp
include/xeus-cpp/xmanager.hpp
include/xeus-cpp/xmagics.hpp
include/xeus-cpp/xoptions.hpp
include/xeus-cpp/xpreamble.hpp
#src/xdemangle.hpp
#src/xinspect.hpp
#src/xsystem.hpp
#src/xparser.hpp
#src/xmagics/os.hpp
)

set(XEUS_CPP_SRC
src/xholder.cpp
src/xinput.cpp
src/xinterpreter.cpp
src/xmagics/os.cpp
src/xoptions.cpp
src/xparser.cpp
src/xutils.cpp
Expand Down
9 changes: 3 additions & 6 deletions src/xmagics/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@
#include "os.hpp"
#include "../xparser.hpp"

#include "xeus-cpp/xoptions.hpp"

namespace xcpp
{
argparser writefile::get_options()
static void get_options(argparser &argpars)
{
argparser argpars("file", XEUS_CLING_VERSION, argparse::default_arguments::none);
argpars.add_description("write file");
argpars.add_argument("-a", "--append").help("append").default_value(false).implicit_value(true);
argpars.add_argument("filename").help("filename").required();
Expand All @@ -37,12 +34,12 @@ namespace xcpp
.help("shows help message")
.implicit_value(true)
.nargs(0);
return argpars;
}

void writefile::operator()(const std::string& line, const std::string& cell)
{
auto argpars = get_options();
argparser argpars("file", XEUS_CPP_VERSION, argparse::default_arguments::none);
get_options(argpars);
argpars.parse(line);

auto filename = argpars.get<std::string>("filename");
Expand Down
1 change: 0 additions & 1 deletion src/xmagics/os.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace xcpp
{
public:

argparser get_options();
virtual void operator()(const std::string& line, const std::string& cell) override;

private:
Expand Down