# HG changeset patch # User Oleksandr Gavenko # Date 1546465747 -7200 # Node ID cdf599c86ccfb3e7bec2e51835d7f64a363498ef # Parent 0cba37c54a9e750fb68fc45d04bacc846957a3ab /bin/stty is in Debian&Alpine, /usr/bin/stty is in Cygwin. diff -r 0cba37c54a9e -r cdf599c86ccf .bashrc --- a/.bashrc Tue Jan 01 23:38:59 2019 +0200 +++ b/.bashrc Wed Jan 02 23:49:07 2019 +0200 @@ -16,8 +16,12 @@ local ruler='================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================' if [[ -x /usr/bin/tput ]]; then local size=`/usr/bin/tput cols` + elif [[ -x /bin/stty ]]; then + local size=`/bin/stty size | { read x y; echo $y; }` + elif [[ -x /usr/bin/stty ]]; then + local size=`/usr/bin/stty size | { read x y; echo $y; }` else - local size=`/usr/bin/stty size | { read x y; echo $y; }` + local size=80 fi ruler=${ruler:0:${size}} _my_ruler=$ruler