a8m / a8m/pb

Allow for terminal colours to be applied to progress characters

Abierto
#38 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
600
Forks
59
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I'm trying to colour the progress format characters using the ansi_term crate. Consider the following format:

```[=>_]```

If the equals sign is to be red and bolded, at least on the Windows platform the format string becomes:

```[\u{1b}[1;31m=\u{1b}[0m>_]```

This sort of format string is not compatible with the current library.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Look at the progress bar formatting code, likely in a module handling format strings. The issue shows an example with ANSI escape sequences. You need to modify the parsing to allow escape codes within the format string without breaking the progress character counting. Check how the format string is currently parsed and rendered, and ensure the escape sequences are stripped for length calculations but passed through for output. Test on Windows to confirm the colored characters display correctly.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
cli
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
40/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.