summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/main.cpp b/main.cpp
index 96e358a..feb4663 100644
--- a/main.cpp
+++ b/main.cpp
@@ -264,11 +264,23 @@ std::string MakeUwu(std::string boringString) {
return boringString;
}
-int main() {
+int main(int argc, char** argv) {
- std::string buf;
- while (std::getline(std::cin, buf))
- std::cout << MakeUwu(buf) << std::endl;
+ // We have arguments. Uwwuifie these instead
+ if (argc > 1)
+ {
+ for (std::size_t i = 1; i < argc; i++)
+ std::cout << MakeUwu(argv[i]) + " ";
+
+ std::cout << std::endl;
+ }
+ // Else, be prepared to get __piped__
+ else
+ {
+ std::string buf;
+ while (std::getline(std::cin, buf))
+ std::cout << MakeUwu(buf) << std::endl;
+ }
return 0;
}