summaryrefslogtreecommitdiff
path: root/Source/Library/Userland/App/ShellApp.proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Library/Userland/App/ShellApp.proto.cpp')
-rw-r--r--Source/Library/Userland/App/ShellApp.proto.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Library/Userland/App/ShellApp.proto.cpp b/Source/Library/Userland/App/ShellApp.proto.cpp
index 840e985..123eb73 100644
--- a/Source/Library/Userland/App/ShellApp.proto.cpp
+++ b/Source/Library/Userland/App/ShellApp.proto.cpp
@@ -16,7 +16,8 @@ ShellApp::~ShellApp() {
void ShellApp::init() {
//Parse flags
u32int argc = pr.argc();
- for (u32int i = 0; i < argc; i++) {
+ args.clear();
+ for (u32int i = 1; i < argc; i++) {
String arg = pr.argv(i);
if (arg.empty()) continue;
if (arg == "-") {
@@ -89,7 +90,7 @@ void ShellApp::init() {
//Eventually show help screen
if (bFlag("help")) {
outvt << appName << ": " << appDesc << "\n";
- outvt << "Usage: \t" << appName << " <flags> [-] <arguments>\n\n";
+ outvt << "Usage: \t" << pr.argv(0) << " <flags> [-] <arguments>\n\n";
outvt << "Possible flags :\n";
for (u32int i = 0; i < flags.size(); i++) {
outvt << " --" << flags[i].lName << "\t" << (flags[i].sName != 0 ? "-" : "") << String(flags[i].sName) << "\t";