mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
small tweak in output space handling
This commit is contained in:
parent
3599dbd7bc
commit
1614e5f2ea
14
inxi
14
inxi
|
@ -60,6 +60,11 @@
|
||||||
#### Booleans should start with b_ or B_ and state clearly what is being tested
|
#### Booleans should start with b_ or B_ and state clearly what is being tested
|
||||||
#### Arrays should start with a_ or A_
|
#### Arrays should start with a_ or A_
|
||||||
#### All functions should follow standard naming, ie, verb adjective noun, get_cpu_data
|
#### All functions should follow standard naming, ie, verb adjective noun, get_cpu_data
|
||||||
|
####
|
||||||
|
#### SPECIAL NOTES:
|
||||||
|
#### The color variable ${C2} must always be followed by a space unless you know what
|
||||||
|
#### character is going to be next for certain. Otherwise irc color codes can be accidentally
|
||||||
|
#### activated or altered.
|
||||||
########################################################################
|
########################################################################
|
||||||
#### TESTING FLAGS
|
#### TESTING FLAGS
|
||||||
#### inxi supports advanced testing triggers to do various things, using -! <arg>
|
#### inxi supports advanced testing triggers to do various things, using -! <arg>
|
||||||
|
@ -1750,7 +1755,12 @@ get_module_version_number()
|
||||||
if [[ -n $( which modinfo ) ]];then
|
if [[ -n $( which modinfo ) ]];then
|
||||||
module_version=$( modinfo $1 | gawk '
|
module_version=$( modinfo $1 | gawk '
|
||||||
BEGIN { IGNORECASE=1 }
|
BEGIN { IGNORECASE=1 }
|
||||||
/^version/ {print $2}
|
/^version/ {
|
||||||
|
gsub(/,/, " ", $2)
|
||||||
|
gsub(/^ +| +$/, "", $2)
|
||||||
|
gsub(/ [ \t]+/, " ", $2)
|
||||||
|
print $2
|
||||||
|
}
|
||||||
' )
|
' )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2506,7 +2516,7 @@ print_module_version()
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n $module_versions ]];then
|
if [[ -n $module_versions ]];then
|
||||||
echo " ${C1}v:${C2} $module_versions"
|
echo " ${C1}v:${C2}$module_versions"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue