@@ -14,52 +14,55 @@ use structopt::StructOpt;
1414use termion:: color;
1515use users:: { get_group_by_gid, get_user_by_uid, uid_t} ;
1616
17+ /// the ls replacement you never knew you needed
1718#[ derive( StructOpt , Debug ) ]
18- #[ structopt( name = "nat" , about = "the ls replacement you never knew you needed" ) ]
1919pub struct Cli {
20- #[ structopt( parse( from_os_str) , default_value = "." , help = "Give me a directory" ) ]
20+ /// Give me a directory
21+ #[ structopt( parse( from_os_str) , default_value = "." ) ]
2122 path : std:: path:: PathBuf ,
2223
23- #[ structopt(
24- default_value = "" ,
25- short = "f" ,
26- long = "file" ,
27- help = "File to search for"
28- ) ]
24+ /// File to search for
25+ #[ structopt( short, long, default_value) ]
2926 file : String ,
3027
31- #[ structopt( short = "l" , long = "headline" , help = "Enables helper headline" ) ]
28+ /// Enables helper headline
29+ #[ structopt( short = "l" , long = "headline" ) ]
3230 headline_on : bool ,
3331
34- #[ structopt( short = "a" , long = "arehidden" , help = "Shows hidden files" ) ]
32+ /// Shows hidden files
33+ #[ structopt( short = "a" , long = "arehidden" ) ]
3534 hidden_files : bool ,
3635
37- #[ structopt( short = "w" , long = "wide" , help = "Enables wide mode output" ) ]
36+ /// Enables wide mode output
37+ #[ structopt( short, long = "wide" ) ]
3838 wide_mode : bool ,
3939
40- #[ structopt(
41- short = "t" ,
42- long = "time" ,
43- help = "Disables the file time modified output"
44- ) ]
40+ /// Disables the file time modified output
41+ #[ structopt( short, long = "time" ) ]
4542 time_on : bool ,
4643
47- #[ structopt( short = "s" , long = "size" , help = "Disables file size output" ) ]
44+ /// Disables file size output
45+ #[ structopt( short, long = "size" ) ]
4846 size_on : bool ,
4947
50- #[ structopt( short = "g" , long = "group" , help = "Disables the file group output" ) ]
48+ /// Disables the file group output
49+ #[ structopt( short, long = "group" ) ]
5150 group_on : bool ,
5251
53- #[ structopt( short = "p" , long = "perms" , help = "Disables the permissions output" ) ]
52+ /// Disables the permissions output
53+ #[ structopt( short, long = "perms" ) ]
5454 perms_on : bool ,
5555
56- #[ structopt( short = "u" , long = "user" , help = "Disables the file user output" ) ]
56+ /// Disables the file user output
57+ #[ structopt( short, long = "user" ) ]
5758 user_on : bool ,
5859
59- #[ structopt( short = "n" , long = "nsort" , help = "Turns off sorting" ) ]
60+ /// Turns off sorting
61+ #[ structopt( short = "n" , long = "nsort" ) ]
6062 is_sorted : bool ,
6163
62- #[ structopt( short = "c" , long = "ncolors" , help = "Turns off color output" ) ]
64+ /// Turns off color output
65+ #[ structopt( short = "c" , long = "ncolors" ) ]
6366 colors_on : bool ,
6467
6568 /// Specify time format https://docs.rs/chrono/*/chrono/format/strftime/index.html
0 commit comments