Luminarys / synapse

Synapse BitTorrent Daemon
https://synapse-bt.org
ISC License
853 stars 48 forks source link

sycli list: How the order of the items is determined? #207

Open alexherbo2 opened 3 years ago

alexherbo2 commented 3 years ago

I’m disoriented to follow a download progress when doing:

while :
do
  clear
  sycli list
  sleep 2
done

and see the order changing.

evanrichter commented 3 years ago

try this

while :
do
  clear
  sycli list | sort
  sleep 2
done
alexherbo2 commented 3 years ago

It will not work exactly because the output is an ASCII table.

evanrichter commented 3 years ago

It does still sort though. You get something like:

+-------------------------------------------------------------------------------------------------------------------+---------+-------------+------------+-------+------------+-------+
+-------------------------------------------------------------------------------------------------------------------+---------+-------------+------------+-------+------------+-------+
+-------------------------------------------------------------------------------------------------------------------+---------+-------------+------------+-------+------------+-------+
| A Linux iso                                                                      | 100.00% | 0 B         | 5.85 GiB   | 0 B/s | 0 B/s      | 0     |
| B Linux iso                                                                      | 100.00% | 5.67 GiB    | 10.41 GiB  | 0 B/s | 0 B/s      | 0     |

So then you can get rid of the horizontal breaks with sycli | sort | tail -n +4

alexherbo2 commented 3 years ago

It is a bit too much involvement for my taste. I like your proposal in #208 to replace the table with tabulated data.