heapwolf / ldb

A C++ REPL / CLI for LevelDB
MIT License
201 stars 23 forks source link

output of `find in values` #38

Closed heapwolf closed 6 years ago

heapwolf commented 10 years ago

should be the width of the terminal.

jwerle commented 10 years ago

clibs/term should help ?

heapwolf commented 10 years ago

I think this is too small of a problem, using the following...

struct winsize term;
ioctl(0, TIOCGWINSZ, &term);

the problem should just be as simple as chopping whatever the length of the output is keeping in mind term.ws_col. I think. Unless the way im doing it isn't portable?

jwerle commented 10 years ago

I think you're right and should be good