diff --git a/inxi b/inxi index 03421cd..7a1b317 100755 --- a/inxi +++ b/inxi @@ -60,6 +60,11 @@ #### Booleans should start with b_ or B_ and state clearly what is being tested #### Arrays should start with a_ or A_ #### 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 #### inxi supports advanced testing triggers to do various things, using -! @@ -1750,7 +1755,12 @@ get_module_version_number() if [[ -n $( which modinfo ) ]];then module_version=$( modinfo $1 | gawk ' BEGIN { IGNORECASE=1 } - /^version/ {print $2} + /^version/ { + gsub(/,/, " ", $2) + gsub(/^ +| +$/, "", $2) + gsub(/ [ \t]+/, " ", $2) + print $2 + } ' ) fi @@ -2506,7 +2516,7 @@ print_module_version() done if [[ -n $module_versions ]];then - echo " ${C1}v:${C2} $module_versions" + echo " ${C1}v:${C2}$module_versions" fi }