Add recursive ls
Change-Id: Ifab8c9577c01cf7a96cda8d79fe232b12b5538bd
diff --git a/src/grammars.hpp b/src/grammars.hpp
index 5a3db0f..fddd409 100644
--- a/src/grammars.hpp
+++ b/src/grammars.hpp
@@ -134,8 +134,16 @@
auto const space_separator =
x3::omit[x3::no_skip[space]];
+struct ls_options_table : x3::symbols<LsOption> {
+ ls_options_table()
+ {
+ add
+ ("--recursive", LsOption::Recursive);
+ }
+} const ls_options;
+
auto const ls_def =
- lit("ls") >> -path;
+ lit("ls") >> *(space_separator >> ls_options) >> -(space_separator >> path);
auto const cd_def =
lit("cd") >> space_separator > path;