summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorLeonetienne <leonetienne@hotmail.de>2022-02-09 03:51:05 +0100
committerLeonetienne <leonetienne@hotmail.de>2022-02-09 03:51:05 +0100
commit6ee65ae6f23b76b6b1ca2b3ab808705a7cc2ea84 (patch)
treeb3d9e2076bbf3ae9be324a7220c3d652dd89b452 /main.cpp
parent3133bc9d3920489cf221e3a8c7fa10da9a617cb6 (diff)
Nyow suwppoting cmd ags
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;
}