- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
Latest commit
24 lines (18 loc) · 523 Bytes
/
Copy pathmain.cpp
File metadata and controls
24 lines (18 loc) · 523 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//
// Created by Will Lane on 2/2/21.
//
#include"include/CLI11.hpp"
#include"utils/types.h"
intmain(int argc, char* argv[]) {
CLI::App app{"natls c++"};
// CLI flag vars
std::string dir = ".";
bool gdf = false;
bool sort = false;
app.add_option("Directory", dir, "Input a file");
app.add_flag("-g,--group-directories-first", gdf, "Do you want dirs first?");
app.add_flag("-s,--sort", sort, "Sort by name");
CLI11_PARSE(app, argc, argv);
(newDirectory(dir, sort))->show_ls(gdf);
return0;
}