progress icon indicating copy to clipboard operation
progress copied to clipboard

Support crayon codes in `complete` and `incomplete`

Open josswright opened this issue 7 years ago • 1 comments

I found in issue #32, and the related pull request #52, that progress supports colour codes from crayon in its format strings.

I was trying, though, to use colour codes for the progress bar itself via the incomplete and complete options. This gives me an error due to the resulting string being not equal to 1: Error in assert_single_char(incomplete) : nchar(x) == 1 is not TRUE.

Is this easily fixable? It would make my progress bars much prettier!

josswright avatar Dec 03 '18 12:12 josswright

I've created PR #118 for this. It'll allows you to do:

library(progress)
library(crayon)
pb <- progress_bar$new(width=40L, complete=bgBlue(" "), incomplete=bgCyan(" "), current=bgCyan("|"))

resulting in:

flameshot_2021-04-07T200251

HenrikBengtsson avatar Apr 08 '21 03:04 HenrikBengtsson