fix(sensors): numeric parser anchors on degree symbol (label-digit bug) [#618]
This commit is contained in:
@@ -50,7 +50,7 @@ numeric_pick() {
|
||||
[[ "$pick" =~ $num_re ]] && { printf '%s\n' "$pick"; return 0; }
|
||||
done
|
||||
if [[ -n "$native" ]]; then
|
||||
pick="$(grep -oE '\-?[0-9]+(\.[0-9]+)?' <<<"$native" | head -1)"
|
||||
pick="$(grep -oE "\-?[0-9]+(\.[0-9]+)?°C" <<<"$native" | head -1)"; pick="${pick%°C}"
|
||||
[[ "$pick" =~ $num_re ]] && { printf '%s\n' "$pick"; return 0; }
|
||||
fi
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user