Add a "--gauge" option which alters the progress bar to show the current rate as a percentage of the max rate seen, if the size is unknown (#46).
This commit is contained in:
@@ -66,6 +66,7 @@ struct opts_s {
|
||||
bool cursor; /* whether to use cursor positioning */
|
||||
bool numeric; /* numeric output only */
|
||||
bool wait; /* wait for transfer before display */
|
||||
bool rate_gauge; /* if size unknown, show rate vs max rate */
|
||||
bool linemode; /* count lines instead of bytes */
|
||||
bool null_terminated_lines; /* lines are null-terminated */
|
||||
bool no_display; /* do nothing other than pipe data */
|
||||
|
||||
@@ -123,6 +123,7 @@ struct pvstate_s {
|
||||
bool cursor; /* use cursor positioning */
|
||||
bool numeric; /* numeric output only */
|
||||
bool wait; /* wait for data before display */
|
||||
bool rate_gauge; /* if size unknown, show rate vs max rate */
|
||||
bool linemode; /* count lines instead of bytes */
|
||||
bool bits; /* report bits instead of bytes */
|
||||
bool decimal_units; /* use decimal prefixes */
|
||||
|
||||
@@ -183,6 +183,7 @@ extern void pv_state_show_stats_set(pvstate_t, bool);
|
||||
extern void pv_state_numeric_set(pvstate_t, bool);
|
||||
extern void pv_state_wait_set(pvstate_t, bool);
|
||||
extern void pv_state_delay_start_set(pvstate_t, double);
|
||||
extern void pv_state_rate_gauge_set(pvstate_t, bool);
|
||||
extern void pv_state_linemode_set(pvstate_t, bool);
|
||||
extern void pv_state_bits_set(pvstate_t, bool);
|
||||
extern void pv_state_decimal_units_set(pvstate_t, bool);
|
||||
|
||||
Reference in New Issue
Block a user