From 76d74640ae402c1078d039671275654f46fd1bb0 Mon Sep 17 00:00:00 2001 From: Eric Ye Date: Wed, 20 Jul 2016 16:07:04 -0700 Subject: [PATCH] Add "help" to qshell for qurt Fixes issue #5111 --- src/drivers/qshell/qurt/qshell.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/drivers/qshell/qurt/qshell.cpp b/src/drivers/qshell/qurt/qshell.cpp index 5be2495450..22247145db 100644 --- a/src/drivers/qshell/qurt/qshell.cpp +++ b/src/drivers/qshell/qurt/qshell.cpp @@ -62,6 +62,7 @@ #include "DriverFramework.hpp" extern void init_app_map(std::map &apps); +extern void list_builtins(std::map &apps); using std::map; using std::string; @@ -146,6 +147,10 @@ int QShell::run_cmd(const std::vector &appargs) // command is appargs[0] std::string command = appargs[0]; + if (command.compare("help") == 0) { + list_builtins(apps); + } + //replaces app.find with iterator code to avoid null pointer exception for (map::iterator it = apps.begin(); it != apps.end(); ++it) { if (it->first == command) {