Closed radioflash closed 9 years ago
This is such an annoying issue. I always thought it was just done on purpose (albeit that's pretty stupid). I guess the proper solution, though, is to use MinTTY, because I'm sure that you could complain about the same issue about a ton of tools, but there's no way that every single one should be hindered just to be somewhat more compatible with outdated and broken technology.
The specific reason for this issue is indeed that carriage return (CR, '\r') only works when the current output line contains less than column-width characters in the default windows console. IMHO this is not really broken per se, just different from what pacman expects.
I guess the proper solution, though, is to use MinTTY
I don't want to use MinTTY- It has no tabs and breaks REPLs (arrow keys won't work without linking with readline or somesuch AFAIK).
I'm sure that you could complain about the same issue about a ton of tools
AFAICT, very few programs are affected by this. Even Vim just works (I have no idea how).
I have submitted a pull request (#11), it is a very simple change, there is no disadvantage and this is a huge improvement for everyone not using MinTTY.
The pacman progress bar currently only works correctly in a mintty window, in a windows CMD.exe window progress-bar updates do not work properly (see attached image). The same problem occurs in other windows terminals, like consolez.
But when the window size of the terminal is changed while updating, progress bars will function correctly (only for the current pacman call, though). This can not be reproduced with the default windows terminal, because its size can't be changed (unlike consolez).
Making the progress bar one character shorter might simply fix this problem!