Subversion Repositories HomeAutomation

Rev

Rev 1664 | Rev 1679 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1664 Rev 1673
Line 169... Line 169...
169
        }
169
        }
170
    }
170
    }
171
   
171
   
172
    return result;
172
    return result;
173
}
173
}
-
 
174
 
-
 
175
function help(command_name)
-
 
176
{
-
 
177
    if (!command_name)
-
 
178
    {
-
 
179
        command_name = "help";
-
 
180
    }
-
 
181
   
-
 
182
    if (Console_Functions[command_name] && Console_Functions[command_name]["help"])
-
 
183
    {
-
 
184
        var result = "";
-
 
185
 
-
 
186
        if (Console_Functions[command_name] && Console_Functions[command_name]["autocomplete"])
-
 
187
        {
-
 
188
            result += "Argument autocompletion enabled for " + command_name + "\n";
-
 
189
        }
-
 
190
 
-
 
191
        result += "Syntax: " + command_name + " " + Console_Functions[command_name]["help"] + "\n";
-
 
192
 
-
 
193
        Log(result);
-
 
194
        return true;
-
 
195
    }
-
 
196
 
-
 
197
    Log("\033[31mNo help for " + command_name + " found.\033[0m\n");
-
 
198
    return false;
-
 
199
}
-
 
200
Console_RegisterCommand(help, function(arg_index, args) { return Console_StandardAutocomplete(arg_index, args, Console_GetFunctionNames()); });
-
 
201
 
174
 
202
 
175
function quit()
203
function quit()
176
{
204
{
177
    Log("Goodbye!\n");
205
    Log("Goodbye!\n");
178
   
206