tty-table icon indicating copy to clipboard operation
tty-table copied to clipboard

How to disable rotating?

Open kke opened this issue 7 years ago • 1 comments

I'd like that to be a simple render option.

kke avatar Jun 14 '17 06:06 kke

The automatic rotation is a little crazy because it also happens when testing code via rspec... specs might pass on your dev machine, but fail if they're run by a dev that uses a narrower terminal, or in travis (https://travis-ci.org/kontena/kontena/jobs/353727211#L861)

Workaround is to fake the screen size...

  before do
    allow(TTY::Screen).to receive(:width).and_return(1000)
  end

The table.render resize: true behavior does not help, and it's actually buggy as well (exceptions in the alignment/truncation operations if the terminal is narrower than some column).

SpComb avatar Mar 16 '18 09:03 SpComb