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.
This commit is contained in:
Stephen Szwiec 2021-03-09 19:23:52 -06:00 committed by GitHub
parent 9666c78aef
commit d5118fa47b
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 -Snf "$chartfile" ;;
2) notify-send -u low "$3 Updating..." "Updating $2 price..."
updateprice "$1" && notify-send "$3 Update complete." "$2 price is now
\$$(cat "$pricefile")" ;;