https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223524

Yuri Pankov <yur...@yuripv.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yur...@yuripv.net

--- Comment #1 from Yuri Pankov <yur...@yuripv.net> ---
There are several problems here:
- by default, regcomp() is called with REG_EXTENDED, so '+' is a special
character and needs to be escaped
- once you quote '+', it becomes ordinary, but '+' is NOT a word character, so
matching fails

`whatis c+` (single plus) returns the same results as `whatis c`, as '+' means
"match 1 or more occurrences".

whatis could be changed to use REG_BASIC instead of REG_EXTENDED, but still,
"c++" is not a word, and won't match.

Given the above, this isn't really a bug as man page says "words" and not
"exact strings" :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to