a8m / a8m/pb

Progress bar should determine terminal width using the specified out stream

Offen
#51 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
600
Forks
59
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Redirecting stdout and printing progress on stderr should determine the correct terminal size. At the moment the terminal size is only calculated correctly if stdout is a tty. Stderr should be used a fallback for that calculation.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

The terminal width detection logic is likely in a module handling TTY checks, such as `src/term.rs` or similar. Look for functions that get terminal size, possibly using `libc` or a crate like `termion` or `console`. The fix involves checking if the primary output stream (stdout) is a TTY, and if not, falling back to checking stderr. Run the existing tests to ensure the progress bar still renders correctly in different redirection scenarios.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.