commander-rb / commander

The complete solution for Ruby command-line executables
MIT License
821 stars 74 forks source link

Problem with the width in console? (short lines) #11

Closed maciejczyzewski closed 9 years ago

maciejczyzewski commented 9 years ago

I worked on the old version of commander. (the one from before the transfer to commander-rb) When I did the update, I notice this strange view: (short lines)

LOL

What's wrong??? Maybe someone knows?

ggilder commented 9 years ago

Hmm, we did have a change to the help formatter recently: https://github.com/commander-rb/commander/pull/9

Can you try running this with commander 4.3.2 (rather than the master branch) and let me know if the problem persists?

maciejczyzewski commented 9 years ago

I use commander 4.3.2! :cry: Example from README.md is not working for me... (the same issue)

ggilder commented 9 years ago

Is there a difference with 4.3.1? If you can pinpoint the version where this changes, that would help narrow it down.

ggilder commented 9 years ago

Actually, I'm thinking this may be an issue with the updated HighLine dependency. Can you try adding the following to your program after any require statements?

puts "Terminal dimensions: #{HighLine::SystemExtensions.terminal_size}"
maciejczyzewski commented 9 years ago

Results:

Checked using RVM ruby 2.0.0p598 (2014-11-13 revision 48408) [x86_64-darwin14.1.0]

maciejczyzewski commented 9 years ago

Solved! Change this #L20 to:

s.add_runtime_dependency('highline', '1.6.21')

(proved by local build, should report it as bug at highline repository)

ggilder commented 9 years ago

Ok, sounds like a bug with HighLine then if those dimensions are wrong for your terminal. Can you file an issue there and link it for reference to this issue?

abinoam commented 9 years ago

It's probably a regression in HighLine. Reporting columns and lines in reverse order. https://github.com/JEG2/highline/pull/139

abinoam commented 9 years ago

Fix released at https://github.com/JEG2/highline/pull/139#issuecomment-94320055 Could @maciejczyzewski and the others please confirm is working in your setups?

ggilder commented 9 years ago

I've released 4.3.3 with an update to use highline 1.7.2. @maciejczyzewski please let me know if you're still seeing any problems.

maciejczyzewski commented 9 years ago

@ggilder @abinoam now it's working :+1:

abinoam commented 9 years ago

Great :+1: