Merge pull request #2714 from choco/stty-width

Use stty instead of tput to get terminal width
This commit is contained in:
Mike McQuaid 2017-06-02 16:32:14 +01:00 committed by GitHub
commit 0731a68cde

View File

@ -6,7 +6,7 @@ module Tty
end
def width
`/usr/bin/tput cols`.strip.to_i
(`/bin/stty size`.split[1] || 80).to_i
end
def truncate(string)