Add recursive ls
Change-Id: Ifab8c9577c01cf7a96cda8d79fe232b12b5538bd
diff --git a/src/interpreter.cpp b/src/interpreter.cpp
index 4e5d665..bdeecf9 100644
--- a/src/interpreter.cpp
+++ b/src/interpreter.cpp
@@ -60,8 +60,13 @@
void Interpreter::operator()(const ls_& ls) const
{
std::cout << "Possible nodes:" << std::endl;
+ auto recursion{Recursion::NonRecursive};
+ for (auto it : ls.m_options) {
+ if (it == LsOption::Recursive)
+ recursion = Recursion::Recursive;
+ }
- for (const auto& it : m_parser.availableNodes(ls.m_path))
+ for (const auto& it : m_parser.availableNodes(ls.m_path, recursion))
std::cout << it << std::endl;
}