mirror of https://github.com/Icinga/icinga2.git
parent
ea729b2b6c
commit
d532300cba
|
@ -101,6 +101,11 @@ int CLICommand::GetMaxArguments(void) const
|
||||||
return GetMinArguments();
|
return GetMinArguments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CLICommand::IsHidden(void) const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
boost::mutex& CLICommand::GetRegistryMutex(void)
|
boost::mutex& CLICommand::GetRegistryMutex(void)
|
||||||
{
|
{
|
||||||
static boost::mutex mtx;
|
static boost::mutex mtx;
|
||||||
|
@ -271,7 +276,7 @@ void CLICommand::ShowCommands(int argc, char **argv, po::options_description *vi
|
||||||
BOOST_FOREACH(const CLIKeyValue& kv, GetRegistry()) {
|
BOOST_FOREACH(const CLIKeyValue& kv, GetRegistry()) {
|
||||||
const std::vector<String>& vname = kv.first;
|
const std::vector<String>& vname = kv.first;
|
||||||
|
|
||||||
if (vname.size() < best_match.size())
|
if (vname.size() < best_match.size() || kv.second->IsHidden())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool match = true;
|
bool match = true;
|
||||||
|
|
|
@ -58,6 +58,7 @@ public:
|
||||||
virtual String GetShortDescription(void) const = 0;
|
virtual String GetShortDescription(void) const = 0;
|
||||||
virtual int GetMinArguments(void) const;
|
virtual int GetMinArguments(void) const;
|
||||||
virtual int GetMaxArguments(void) const;
|
virtual int GetMaxArguments(void) const;
|
||||||
|
virtual bool IsHidden(void) const;
|
||||||
virtual void InitParameters(boost::program_options::options_description& visibleDesc,
|
virtual void InitParameters(boost::program_options::options_description& visibleDesc,
|
||||||
boost::program_options::options_description& hiddenDesc) const;
|
boost::program_options::options_description& hiddenDesc) const;
|
||||||
virtual ImpersonationLevel GetImpersonationLevel(void) const;
|
virtual ImpersonationLevel GetImpersonationLevel(void) const;
|
||||||
|
|
Loading…
Reference in New Issue