Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: get status and capacity with multiple power_supplies
It is possible that $BAT contains multiple power_supplies like ```bash /sys/class/power_supply/AC /sys/class/power_supply/BAT0 /sys/class/power_supply/ucsi-source-psy-USBC000:001 ``` In such a case, the original code becomes `cat AC BAT0 ucsi-source-psy-USBC000:001/status` (path prefix omitted). It fails to run because you cannot `cat` a directory.
- Loading branch information