mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
Replace tput with $COLUMNS
This commit is contained in:
parent
be554c4bf6
commit
2b35ac9f45
1 changed files with 1 additions and 5 deletions
|
|
@ -14,15 +14,11 @@ year_progress() {
|
|||
# progress=current/year
|
||||
value=`echo "$current $len" | awk '{printf ("%.2f\n",$1/$2)}'`
|
||||
|
||||
# Get the number of columns in the terminal
|
||||
tput init
|
||||
cols=`tput cols`
|
||||
|
||||
val2=$(($current*100/$len))
|
||||
|
||||
info=$val2%' '$current/$len
|
||||
|
||||
cols=$(($cols-${#info}))
|
||||
cols=$(($COLUMNS-${#info}))
|
||||
|
||||
# Fill the proportion of the screen
|
||||
scale=`echo "$cols" | awk '{printf ("%.2f\n",$1/100)}'`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue