private string[] ListCommandNames(string prefix, CommandListOptions options) { IList <CCommand> commands = CRegistery.ListCommands(delegate(CCommand cmd) { return(!(cmd is CVarCommand) && CRegistery.ShouldListCommand(cmd, prefix, options)); }); return(Collection.Map(commands, delegate(CCommand cmd) { return C(cmd.Name, cmd.ColorCode); })); }
protected override IList <string> AutoCompleteArgs(string commandLine, string prefix) { IList <CVar> vars = CRegistery.ListVars(delegate(CVarCommand cmd) { return(cmd.IsBool && CRegistery.ShouldListCommand(cmd, prefix, CCommand.DefaultListOptions)); }); if (vars.Count == 0) { return(null); } return(Collection.Map(vars, delegate(CVar cvar) { return StringUtils.C(cvar.Name, ColorCode.TableVar); })); }
protected override IList <string> AutoCompleteArgs(string commandLine, string token) { IList <CCommand> commands = CRegistery.ListCommands(delegate(CCommand command) { return(!(command is CVarCommand) && !(command is CDelegateCommand) && !(command is CAliasCommand) && CRegistery.ShouldListCommand(command, token, CCommand.DefaultListOptions)); }); if (commands.Count == 0) { return(null); } return(Collection.Map(commands, delegate(CCommand cmd) { return StringUtils.C(cmd.Name, cmd.ColorCode); })); }