fix(cli): filter outage schedule by selected bill
This commit is contained in:
5
main.sh
5
main.sh
@@ -68,7 +68,7 @@ repository state. The countdown updates every second.
|
||||
|
||||
Options:
|
||||
-i, --interval MINUTES Refetch state at this interval (default: 10)
|
||||
-b, --bill-id BILL_ID Use only this bill for the large countdown
|
||||
-b, --bill-id BILL_ID Show the countdown and schedule for this bill only
|
||||
-h, --help Show this help
|
||||
|
||||
Environment:
|
||||
@@ -334,6 +334,9 @@ build_schedule() {
|
||||
|
||||
while IFS= read -r record; do
|
||||
record_fields "$record" fields
|
||||
if [[ -n "$countdown_bill_id" && "${fields[0]}" != "$countdown_bill_id" ]]; then
|
||||
continue
|
||||
fi
|
||||
if [[ "${fields[2]}" != "active" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user