Date: Sat, 9 Feb 2002 14:17:44 -0500 From: parv <parv_@yahoo.com> To: f-q <freebsd-questions@freebsd.org> Subject: less ungetcc overflow when passing a long pattern Message-ID: <20020209191743.GA39154@moo.holy.cow>
next in thread | raw e-mail | index | archive | help
when the following regex is passed to less, i get the "ungetcc
overflow" error message; after which less quits.
# regex (121-characters long minus the "'" ) wrapped for email
# change ^I to actual tab (character)
#
less --pattern='experience|\
^[ ^I]+[[:alpha:] \/]+\:|\
[[:alnum:]\\.\\-\\+]+@[[:alnum:]\\.\\-]+\\.[[:alpha:]]+|\
http\:\/\/[[:alnum:]\/\\.\\-]+' filename
if regex shortened, say, "experience|" is removed, everything goes
just fine. is there limit on the length of pattern passed? less(1)
doesn't seem to say much on the issue.
same thing happens when less is used a mutt pager w/ above regex
(thus having no pager at all, until changed).
btw, above regex works, w/o passing it on command line, inside the
less, specified via search("/") command.
so, my inquiry is: is it not possible to mention this limit in
less(1)?
this may apply to all the options that less takes; --pattern option
is most likely to be easily long enough to cause error though, in my
not-so-extensive and non-c-programming experience.
- parv
--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020209191743.GA39154>
