juk3n/fluffypublic Fork
⑂ ffd2745
Commits
⬇ Clone ▾
git clone https://git.rickub.com/juk3n/fluffy.git
git clone ssh://git@rickub.com/juk3n/fluffy.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Merge pull request #24 from Juk3n/23-add-handling--help-flagUnverified

23 add handling  help flag
Adrian Duraj committed 2024-07-05T17:50:37+02:00 Browse files
ffd2745 parents: b4bea96 82ac082
modified app/src/main.cpp +6 -2
@@ -88,7 +88,11 @@ auto handleCommand(const std::string& command, const std::vector<std::string>& a
8888 std::cout << "fluffy v0.1.1" << std::endl;
8989 }
9090 else if (command == "--help") {
91- std::cout << "help" << std::endl;
91+ std::cout << "fluffy commands:" << std::endl;
92+ std::cout << " play <game_name> Runs a game" << std::endl;
93+ std::cout << " add <game_name> <game_path> Add a game library" << std::endl;
94+ std::cout << " show Show all games added to library" << std::endl;
95+ std::cout << " rm <game_name> Remove game from a library" << std::endl;
9296 }
9397 else {
9498 std::cout << "fluffy: '" << command << "' is not a fluffy command. See 'fluffy --help'" << std::endl;
@@ -136,7 +140,7 @@ auto runConsoleApp() -> void {
136140 });
137141 auto renderer = Renderer(container, [&] {
138142 return vbox({
139- center(text(L" Fluffy v0.1 ")),
143+ center(text(L" Fluffy v0.1.1 ")),
140144 appContainer->Render(),
141145 }) |
142146 border | size(WIDTH, LESS_THAN, 120);
@@ -88,7 +88,11 @@ auto handleCommand(const std::string& command, const std::vector<std::string>& a
88 std::cout << "fluffy v0.1.1" << std::endl;88 std::cout << "fluffy v0.1.1" << std::endl;
89 }89 }
90 else if (command == "--help") {90 else if (command == "--help") {
91- std::cout << "help" << std::endl;91+ std::cout << "fluffy commands:" << std::endl;
92+ std::cout << " play <game_name> Runs a game" << std::endl;
93+ std::cout << " add <game_name> <game_path> Add a game library" << std::endl;
94+ std::cout << " show Show all games added to library" << std::endl;
95+ std::cout << " rm <game_name> Remove game from a library" << std::endl;
92 }96 }
93 else {97 else {
94 std::cout << "fluffy: '" << command << "' is not a fluffy command. See 'fluffy --help'" << std::endl;98 std::cout << "fluffy: '" << command << "' is not a fluffy command. See 'fluffy --help'" << std::endl;
@@ -136,7 +140,7 @@ auto runConsoleApp() -> void {
136 });140 });
137 auto renderer = Renderer(container, [&] {141 auto renderer = Renderer(container, [&] {
138 return vbox({142 return vbox({
139- center(text(L" Fluffy v0.1 ")),143+ center(text(L" Fluffy v0.1.1 ")),
140 appContainer->Render(),144 appContainer->Render(),
141 }) |145 }) |
142 border | size(WIDTH, LESS_THAN, 120);146 border | size(WIDTH, LESS_THAN, 120);