Consistent style for loops (while and for)
This commit is contained in:
parent
df26c49ff9
commit
aed833058f
@ -602,8 +602,7 @@ _lp_set_dirtrim() {
|
|||||||
local q="/${p##*/}"
|
local q="/${p##*/}"
|
||||||
local show="$q"
|
local show="$q"
|
||||||
# +3 because of the ellipsis: "..."
|
# +3 because of the ellipsis: "..."
|
||||||
while (( ${#show}+3 < max_len ))
|
while (( ${#show}+3 < max_len )); do
|
||||||
do
|
|
||||||
(( dt++ ))
|
(( dt++ ))
|
||||||
p="${p%$q}"
|
p="${p%$q}"
|
||||||
q="/${p##*/}"
|
q="/${p##*/}"
|
||||||
@ -786,8 +785,7 @@ _lp_upwards_find()
|
|||||||
{
|
{
|
||||||
local dir
|
local dir
|
||||||
dir="$PWD"
|
dir="$PWD"
|
||||||
while [[ -n "$dir" ]]
|
while [[ -n "$dir" ]]; do
|
||||||
do
|
|
||||||
[[ -d "$dir/$1" ]] && return 0
|
[[ -d "$dir/$1" ]] && return 0
|
||||||
dir="${dir%/*}"
|
dir="${dir%/*}"
|
||||||
done
|
done
|
||||||
@ -1385,8 +1383,7 @@ _lp_temp_sensors()
|
|||||||
_lp_temp_acpi()
|
_lp_temp_acpi()
|
||||||
{
|
{
|
||||||
local i
|
local i
|
||||||
for i in $(acpi -t | sed 's/.* \([0-9]*\)\.[0-9]* degrees C$/\1/p')
|
for i in $(acpi -t | sed 's/.* \([0-9]*\)\.[0-9]* degrees C$/\1/p'); do
|
||||||
do
|
|
||||||
[[ $i -gt $temperature ]] && temperature=$i
|
[[ $i -gt $temperature ]] && temperature=$i
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user