Compiles
This commit is contained in:
@ -11,12 +11,6 @@
|
||||
|
||||
void dropshell::autocomplete(const std::vector<std::string> &args)
|
||||
{
|
||||
auto cfg = dropshell::get_global_config();
|
||||
// std::cerr << "[ "<<args.size()<<" ] : ";
|
||||
// for (const auto& arg : args)
|
||||
// std::cerr << arg << " ";
|
||||
// std::cerr << std::endl;
|
||||
|
||||
if (args.size() < 3) // dropshell autocomplete ???
|
||||
{
|
||||
autocomplete_list_commands();
|
||||
@ -32,7 +26,7 @@ void dropshell::autocomplete(const std::vector<std::string> &args)
|
||||
if (std::find(std::begin(noargcmds), std::end(noargcmds), cmd) != std::end(noargcmds))
|
||||
return;
|
||||
|
||||
if (!cfg->is_config_set())
|
||||
if (!dropshell::gConfig().is_config_set())
|
||||
return; // can't help without working config.
|
||||
|
||||
if (args.size()==3) // we have the command but nothing else. dropshell autocomplete command <server>
|
||||
@ -89,7 +83,7 @@ void dropshell::autocomplete_list_commands()
|
||||
commands.merge(std::set<std::string>{
|
||||
"help","init" // these are always available.
|
||||
});
|
||||
if (dropshell::get_global_config()->is_config_set())
|
||||
if (dropshell::gConfig().is_config_set())
|
||||
commands.merge(std::set<std::string>{
|
||||
"server","templates","create-service","create-template","create-server","edit","ssh",
|
||||
"list" // only if we have a config.
|
||||
|
Reference in New Issue
Block a user