From be88609c825e18201f240415fe74a31c1a789484 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 19 May 2021 18:00:16 -0400 Subject: Added git command; refactoring --- src/dmtool.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/dmtool.cc') diff --git a/src/dmtool.cc b/src/dmtool.cc index f4fe19c..90f7813 100644 --- a/src/dmtool.cc +++ b/src/dmtool.cc @@ -46,6 +46,7 @@ int main(int argc, char *argv[]) { try { std::string exename = argv[0]; std::vector args(&argv[1], &argv[argc]); + auto argsWithFlags = args; std::vector flags = extractFlags(args); cmd::mkdir({cmd::getTruePath("")}); if(args.empty()) { @@ -71,6 +72,7 @@ int main(int argc, char *argv[]) { else if(cmd == "del") std::cout << cmd::del(args); else if(cmd == "edit") std::cout << cmd::edit(args); else if(cmd == "spellcasting") std::cout << cmd::spellcasting(args); + else if(cmd == "git") std::cout << cmd::git(argsWithFlags); else if(cmd == "help") std::cout << cmd::usage(exename); else std::cout << cmd::list(argsOrig); } catch(std::exception& e) { -- cgit v1.2.3