diff --git a/bin/cave-stat b/bin/cave-stat index 717099e..2fe158e 100755 --- a/bin/cave-stat +++ b/bin/cave-stat @@ -10,6 +10,7 @@ def cave_stat(): if "--x-of-y" in cmdline: position = [c for c in cmdline if " of " in c][0] + pos_x, pos_y = [int(a) for a in position.split(" of ")] if "--destination" in cmdline: action = "Installing" @@ -19,7 +20,7 @@ def cave_stat(): action = "Downloading" atom = [c for c in cmdline if "::" in c and c[0] == "="][0] - yield "%s %s (%s)" %(action, atom, position) + yield "%s %s (%s, %.01f %%)" %(action, atom, position, 100 * pos_x / pos_y) if __name__ == "__main__": for state in cave_stat():