jmattaa / laser

basically `ls` but `lsr`
MIT License
18 stars 4 forks source link

Recursive depth argument for cmd line #21

Closed EgorWeders closed 2 weeks ago

EgorWeders commented 2 weeks ago

To see how it works change in main.c laser_list_directory 3 params to value bigger then -1 (-1 prints max available ). You only need to implement cmd parsing for depth value ( int recursive_depth in opt struct for example).

EgorWeders commented 2 weeks ago

With 0 изображение

With 1

изображение

With -1 it works like before

EgorWeders commented 2 weeks ago

Usage : -r0 (only root dir content) , -rN (traverse recursively to max N depth of root dir content), -r (max available depth for root dir)

jmattaa commented 2 weeks ago

I have added documentation and ability to run --recursive=N using the long argument.