Discussion:
libedit history size required
Björn Gohla
2021-04-15 20:41:10 UTC
Permalink
hi all,

i came across this little problem when using the edit library
(https://github.com/openbsd/src/tree/master/lib/libedit): when using the
history facility one needs to explicitly set a size, e.g.,

history(hist, &event, H_SETSIZE, 100);

otherwise history will not work. the man page history(3) makes no
mention of this fact. this leads me to three questions:

0. is this an oversight or by design?
1. shouldn't this requirement be documented?
2. shouldn't there be a reasonable default?

if the answers to 1. or 2. are yes, i'd be willing to send patches.

--
cheers,
björn

Loading...