ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] [PATCH] disallow duplicate group names


From: J.R. Mauro
Subject: Re: [RP] [PATCH] disallow duplicate group names
Date: Fri, 17 Oct 2008 19:46:13 -0400

On Fri, Oct 17, 2008 at 7:43 PM, Shawn <address@hidden> wrote:
> Ali Gholami Rudi <address@hidden> writes:
>
>> Hi Shawn,
>>
>> On Oct 17 2008 12:12 +0330, Shawn wrote:
>>> Ali Gholami Rudi <address@hidden> writes:
>>>
>>>> +  if (groups_get_group_by_name (ARG_STRING (0)))
>>>> +  if (groups_get_group_by_name (ARG_STRING (0)))
>>>> +  if (groups_get_group_by_name (ARG_STRING (0)))
>>>
>>>>  rp_group *groups_find_group_by_name (char *s);
>>>> +rp_group *groups_get_group_by_name (char *s);
>>>
>>> Doesn't groups_find_group_by_name work for these cases?
>>
>> No.  It finds the first group that starts with the given prefix (it
>> uses str_comp()).  I've tried adding an "exact" parameter to
>> groups_find_group_by_name(), but IMO it wasn't any cleaner.
>
> Ahh, I see.
>
>> Maybe group_find_group_by_name() can be changed to find the exact
>> match? AFAICT, that usually means only an extra tab key: "gselect def"
>> no longer works for switching to the "default" group (also gselect
>> won't be case insensitive anymore).  Doing so will also solve the
>> situation when there are two groups in which the name of one groups is
>> the prefix of the other.  For instance when "a" and "ab" groups exist,
>> it is impossible to switch to "a" group when "ab" has a lower group
>> number (when not using group number in gselect, of course).
>
> Give groups_find_group_by_name an argument: exact_match. If its
> non-zero then then do an exact match. if its 0 then do what it
> currently does. update the existing code, patch up your code, and
> bipass the secondary manifold using a 0.04 micron phase discriminator.

But Captain, she canna' take the strain! Ye'll fly her apart!

>
> -Shawn
>
>
> _______________________________________________
> Ratpoison-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ratpoison-devel
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]