mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Case insensitive.
This commit is contained in:
parent
7ec5be30df
commit
46d318e3ef
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-set-option.c,v 1.5 2007-10-12 12:08:51 nicm Exp $ */
|
||||
/* $Id: cmd-set-option.c,v 1.6 2007-10-12 12:11:40 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -107,11 +107,11 @@ cmd_set_option_exec(void *ptr, unused struct cmd_ctx *ctx)
|
||||
number = strtonum(data->value, 0, UINT_MAX, &errstr);
|
||||
|
||||
bool = -1;
|
||||
if (number == 1 || strcmp(data->value, "on") == 0 ||
|
||||
strcmp(data->value, "yes") == 0)
|
||||
if (number == 1 || strcasecmp(data->value, "on") == 0 ||
|
||||
strcasecmp(data->value, "yes") == 0)
|
||||
bool = 1;
|
||||
if (number == 0 || strcmp(data->value, "off") == 0 ||
|
||||
strcmp(data->value, "no") == 0)
|
||||
else if (number == 0 || strcasecmp(data->value, "off") == 0 ||
|
||||
strcasecmp(data->value, "no") == 0)
|
||||
bool = 0;
|
||||
} else
|
||||
bool = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user