pkolaczk / fclones

Efficient Duplicate File Finder
MIT License
1.94k stars 75 forks source link

fclones group partially clears the terminal #217

Closed th1000s closed 11 months ago

th1000s commented 1 year ago

Running fclones group . works fine, but redirecting paints over existing output. In both xterm and konsole the following terminal state

/foo$ for i in {1..25}; do echo $i; done
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/foo$ fclones group . > /dev/null

becomes this after running the group command:

/foo$ for i in {1..25}; do echo $i; done
1
2
3
/foo$ 

Redirecting stderr (e.g. 2> /dev/null) prevents this.

Motophan commented 1 year ago

Are you on arch linux? Mine does that too

Pesc0 commented 1 year ago

On archlinux can confirm. Also fclones group | fclones remove --dry-run results in fclones: error: Failed to write report: Broken pipe (os error 32)

pkolaczk commented 1 year ago

I guess that might be something related to printing the progress bar. Adding --quiet option fixes it fclones --quiet group ... >/dev/null.

Thank's for reporting.

Pesc0 commented 12 months ago

@pkolaczk might this commit be the cause?

pkolaczk commented 11 months ago

I don't know, this indeed looks like indicatif issue. I have no idea if downgrading it fixes it. Upgrading to the newest version didn't help.

For sure I can also reproduce it both on macOS and Ubuntu.

Pesc0 commented 11 months ago

Thank you so much Piotr!