Handle color control sequences (#911)

* Handle color control sequences

Is: `less` outputs the raw ascii of the $chartfile, which includes escape characters to change output colors. This does not resemble a graph. 
Should be: Adding -n flag to have `less` create colored output properly.

* typo

changed to -Srf to reflect proposed change
This commit is contained in:
Stephen Szwiec 2021-03-10 06:19:47 -06:00 committed by GitHub
parent 9666c78aef
commit 87c2950039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ updateprice() { ping -q -c 1 example.org >/dev/null 2>&1 &&
updateprice "$1"
case $BLOCK_BUTTON in
1) setsid "$TERMINAL" -e less -Sf "$chartfile" ;;
1) setsid "$TERMINAL" -e less -Srf "$chartfile" ;;
2) notify-send -u low "$3 Updating..." "Updating $2 price..."
updateprice "$1" && notify-send "$3 Update complete." "$2 price is now
\$$(cat "$pricefile")" ;;