File tree Expand file tree Collapse file tree 6 files changed +33
-5
lines changed
Expand file tree Collapse file tree 6 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 11# NShell Changelog
22
3+ ## Build 5
4+
5+ - ErikTheRDev added c.version and updated version.
6+ - A contributors file has been added.
7+ - A help command has been added as well.
8+
39## Build 4
410
511- You no longer have to press Enter to exit the application.
Original file line number Diff line number Diff line change 11# depslib dependency file v1.0
2- 1681378820 source:d:\nicos code\shell\nshell\nshell\main.cpp
2+ 1681493466 source:d:\nicos code\shell\nshell\nshell\main.cpp
3+ "help.h"
34 <iostream>
4- <limits>
5+
6+ 1681493184 d:\nicos code\shell\nshell\nshell\help.h
57
Original file line number Diff line number Diff line change 44 <ActiveTarget name =" Release" />
55 <File name =" main.cpp" open =" 1" top =" 1" tabpos =" 1" split =" 0" active =" 1" splitpos =" 0" zoom_1 =" 0" zoom_2 =" 0" >
66 <Cursor >
7- <Cursor1 position =" 58 " topLine =" 0" />
7+ <Cursor1 position =" 19 " topLine =" 0" />
88 </Cursor >
99 </File >
1010</CodeBlocks_layout_file >
Original file line number Diff line number Diff line change 1+ #include " help.h"
2+ #include < iostream>
3+
4+ void help_generic () {
5+ std::cout << " help - Shows this, what else do I have to say?\n " ;
6+ std::cout << " version - Shows the NShell build number.\n " ;
7+ std::cout << " c.version - Same as version, but in a single line.\n " ;
8+ std::cout << " exit - Closes the NShell.\n " ;
9+ }
Original file line number Diff line number Diff line change 1+ #ifndef HELP_H_INCLUDED
2+ #define HELP_H_INCLUDED
3+
4+ void help_generic ();
5+
6+ #endif // HELP_H_INCLUDED
Original file line number Diff line number Diff line change 1+ #include " help.h"
12#include < iostream>
23
3- int buildNr = 4 ;
4+ int buildNr = 5 ;
45
56int main ()
67{
@@ -16,11 +17,15 @@ int main()
1617 if (command_to_run == " version" ) {
1718 std::cout << " NShell\n " << " Build " << buildNr << ' \n ' ;
1819 }
19-
20+
2021 else if (command_to_run == " c.version" ) {
2122 std::cout << " NShell Build " << buildNr << ' \n ' ;
2223 }
2324
25+ else if (command_to_run == " help" ) {
26+ help_generic ();
27+ }
28+
2429 else if (command_to_run == " exit" ) {
2530 break ;
2631 }
You can’t perform that action at this time.
0 commit comments