Compare commits
1 Commits
fa035daae1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
2ba8720b09
|
@@ -204,8 +204,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string GetArg(std::string w, std::string def = "") {
|
std::string GetArg(std::string w, std::string def = "") {
|
||||||
if (!FindShort(m_args, w))
|
if (!FindShort(m_args, w)) return def;
|
||||||
return def;
|
|
||||||
for (size_t i = 0; i < m_args.size() - 1; i++) {
|
for (size_t i = 0; i < m_args.size() - 1; i++) {
|
||||||
if (m_args[i] == std::string("-" + w)) {
|
if (m_args[i] == std::string("-" + w)) {
|
||||||
return m_args[i + 1];
|
return m_args[i + 1];
|
||||||
@@ -268,6 +267,7 @@ public:
|
|||||||
|
|
||||||
void Execute() {
|
void Execute() {
|
||||||
command::ArgumentList arglist;
|
command::ArgumentList arglist;
|
||||||
|
if (m_args.size() > 1) {
|
||||||
for (const auto &c : m_commands) {
|
for (const auto &c : m_commands) {
|
||||||
if (c.GetName() == m_args[1]) {
|
if (c.GetName() == m_args[1]) {
|
||||||
for (const auto &j : c.GetArgs()) {
|
for (const auto &j : c.GetArgs()) {
|
||||||
@@ -291,6 +291,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
PrintHelp("");
|
PrintHelp("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user