| 177 | } |
| 178 | |
| 179 | static std::vector<std::string> SplitConfigPath(const std::string& path) |
| 180 | { |
| 181 | std::vector<std::string> parts; |
| 182 | std::string rem = path; |
| 183 | while (true) |
| 184 | { |
| 185 | auto pos = rem.find(">>"); |
| 186 | if (pos == std::string::npos) |
| 187 | { |
| 188 | std::string part = Trim(rem); |
| 189 | if (!part.empty()) |
| 190 | parts.push_back(part); |
| 191 | break; |
| 192 | } |
| 193 | |
| 194 | std::string part = Trim(rem.substr(0, pos)); |
| 195 | if (!part.empty()) |
| 196 | parts.push_back(part); |
| 197 | rem = rem.substr(pos + 2); |
| 198 | } |
| 199 | return parts; |
| 200 | } |
| 201 | |
| 202 | void ConfigCommand::Setup(CLI::App& app) |
| 203 | { |