You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// contains function that checks if the stringy vector contains the thing its self explanatory
2092
+
2096
2093
2097
2094
intmain(int argc, char* argv[]) {
2098
2095
SetConsoleOutputCP(CP_UTF8);
@@ -2153,21 +2150,13 @@ int main(int argc, char* argv[]) {
2153
2150
return0; // exit after printing help because it might try to process -help as a process name otherwise
2154
2151
}
2155
2152
2156
-
// at this point, if help exists but is not the first argument we can assume the user is asking about a specific flag
2157
-
bool help = contains(args, "-help");
2158
-
2153
+
2159
2154
if (args[1] == "-v" || args[1] == "-version") {
2160
-
if (!help) {
2161
2155
std::cout << "\nwin-witr " << version << std::endl;
2162
-
} else {
2163
-
std::cout << "Shows the version number of win-witr. If it says \"dev-build\", it means you compiled it yourself without a version number compiler environment variable.\n";
2164
-
2165
-
}
2166
2156
return0;
2167
2157
}
2168
2158
2169
2159
if (args[1] == "-pid") {
2170
-
if (!help) {
2171
2160
if (i + 1 < args.size()) {
2172
2161
2173
2162
std::string pidStr = args[i + 1]; // never increment the actual variable unless you're actually trying to find the next argument, otherwise
@@ -2224,14 +2213,9 @@ int main(int argc, char* argv[]) {
2224
2213
return1;
2225
2214
}
2226
2215
return0;
2227
-
}
2228
-
else {
2229
-
std::cout << "Looks up a specific process based on the Process ID (PID) and returns information such as RAM usage, process ancestry, listening ports, and more.\n";
@@ -2248,10 +2232,6 @@ int main(int argc, char* argv[]) {
2248
2232
}
2249
2233
}
2250
2234
}
2251
-
} else {
2252
-
std::cout << "Looks up a process based on the name. The search is case-insensitive, and you do not need to type the .exe extension. If there are multiple processes with similar names, it will show them to you under \"Related Processes\" along with their PIDs so you can manually search up each one using the --pid flag.\n";
0 commit comments