mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
Update regular expression to be POSIX compatible
This commit is contained in:
@@ -6,7 +6,7 @@ if ! command -v "command_exists" >/dev/null; then command_exists() { command -v
|
|||||||
ac_adapter_connected(){
|
ac_adapter_connected(){
|
||||||
if command_exists upower;
|
if command_exists upower;
|
||||||
then
|
then
|
||||||
upower -i $(upower -e | grep BAT) | grep 'state' | grep -q '[: \t]charging\|fully-charged'
|
upower -i $(upower -e | grep BAT) | grep 'state' | grep -q '[:[:blank:]]charging\|fully-charged'
|
||||||
return $?
|
return $?
|
||||||
elif command_exists acpi;
|
elif command_exists acpi;
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user