Scheduler/Console: Fix adding variables to ScopedDirectory instances
[senf.git] / Scheduler / Console / Executor.cc
index 80d632f..8f054c7 100644 (file)
@@ -33,6 +33,7 @@
 #include "../../Utils/senfassert.hh"
 #include "../../Utils/Range.hh"
 #include "../../Utils/String.hh"
+#include "../../Utils/range.hh"
 
 //#include "Executor.mpp"
 #define prefix_
@@ -232,7 +233,7 @@ prefix_ void senf::console::Executor::help(std::ostream & output,
                                            ParseCommandInfo::TokensRange path)
 {
     GenericNode const & node (traverseNode(path));
-    output << prettyName(typeid(node)) << " at " << node.path() << "\n\n";
+    // output << prettyName(typeid(node)) << " at " << node.path() << "\n\n";
     node.help(output);
     output << std::flush;
 }
@@ -301,7 +302,7 @@ prefix_ std::string senf::console::Executor::complete(DirectoryNode & dir,
 {
     if (! dir.hasChild(name)) {
         DirectoryNode::ChildrenRange completions (dir.completions(name));
-        if (completions.size() == 1)
+        if (has_one_elt(completions))
             return completions.begin()->first;
     }
     return name;