Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a search command for finding specific cvar names based on partial names. #101

Open
dGr8LookinSparky opened this issue Sep 7, 2019 · 1 comment

Comments

@dGr8LookinSparky
Copy link

Implement a search command for finding specific cvar names based on partial names.

@zturtleman
Copy link

This can be done using cvarlist *searchterm (which in ioquake3 at least matches any suffix as well because Com_Filter is dumb). Likewise for cmdlist.

void Cvar_List_f(void)
{
cvar_t *var;
int i;
const char *match;
if (Cmd_Argc() > 1)
{
match = Cmd_Argv(1);
}
else
{
match = nullptr;
}
i = 0;
for (var = cvar_vars; var; var = var->next, i++)
{
if (!var->name || (match && !Com_Filter(match, var->name, false)))
continue;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants