Skip to content

Commit

Permalink
Utiltiies: Fix 'ls' help
Browse files Browse the repository at this point in the history
  • Loading branch information
fido2020 committed Jan 7, 2022
1 parent 1980c53 commit 101e467
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Utilities/ls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ void DisplayPath(const char* path, bool displayPath = false){
int main(int argc, char** argv){

option opts[] = {
{"help", no_argument, &help, true},
{"help", no_argument, nullptr, 'h'},
{"inode", no_argument, nullptr, 'i'},
{"size", no_argument, nullptr, 's'},
{"recursive", no_argument, nullptr, 'R'},
};

int option;
while((option = getopt_long(argc, argv, "isdR", opts, nullptr)) >= 0){
while((option = getopt_long(argc, argv, "ihsdR", opts, nullptr)) >= 0){
switch(option){
case 'i':
inode = true;
Expand All @@ -110,6 +110,9 @@ int main(int argc, char** argv){
case 'R':
recursive = true;
break;
case 'h':
help = true;
break;
case '?':
printf("For usage see '%s --help'", argv[0]);
return 1;
Expand Down

0 comments on commit 101e467

Please sign in to comment.