achannarasappa / ticker

Terminal stock ticker with live updates and position tracking
GNU General Public License v3.0
5.02k stars 273 forks source link

Holdings formatting wrong when holding >9999 #145

Closed gabrielpres closed 3 years ago

gabrielpres commented 3 years ago

Describe the bug When "show-holdings: true" in .ticker.yaml, if holdings are >9999 units the formatting and output is wrong (any number > 9999 comes out as "38;5;188m" and also affects the alignment of other fields in the same line

To Reproduce Steps to reproduce the behavior:

  1. Show-holdings: true
  2. Put Quantity >9999 for a stock (This might be a common case for "penny stocks")
  3. See error when loading. Holdings for that stock is shown as "38;5;188m"

Expected behavior Normal formatting

Screenshots I attach screenshot with holdings 9999 and holdings 10000 of same stock

Screenshot 2021-03-08 at 17 38 33 Screenshot 2021-03-08 at 17 39 02

Environment (please complete the following information):

achannarasappa commented 3 years ago

Thanks for reporting this. I'll put out a fix later today

dtcooper commented 3 years ago

Dupe of https://github.com/achannarasappa/ticker/issues/143

achannarasappa commented 3 years ago

Fixed in latest release - added 3 additional digits of space