diff options
author | Your Name <you@example.com> | 2021-05-19 18:00:16 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-05-19 18:00:16 -0400 |
commit | be88609c825e18201f240415fe74a31c1a789484 (patch) | |
tree | 8b051262fcd9e1388ba45f14369112d3d9fb0d52 /src/dmtool.cc | |
parent | 38e33d8756a5b652965be8ada478b5c4238b857c (diff) | |
download | dmtool-be88609c825e18201f240415fe74a31c1a789484.tar.gz dmtool-be88609c825e18201f240415fe74a31c1a789484.tar.bz2 dmtool-be88609c825e18201f240415fe74a31c1a789484.zip |
Added git command; refactoring
Diffstat (limited to 'src/dmtool.cc')
-rw-r--r-- | src/dmtool.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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<std::string> args(&argv[1], &argv[argc]); + auto argsWithFlags = args; std::vector<std::string> 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) { |