mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
fixed bug with pardus pisi output, stripping out colors
This commit is contained in:
parent
e7e2a381a9
commit
c1dff27d83
8
inxi
8
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.3.8
|
#### version: 1.3.9
|
||||||
#### Date: February 1 2010
|
#### Date: February 1 2010
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -3251,10 +3251,10 @@ $repo_data_working"
|
||||||
do
|
do
|
||||||
repo_line=$( gawk '
|
repo_line=$( gawk '
|
||||||
{
|
{
|
||||||
# need to dump leading/trailing spaces and change [,] to (, ) for irc output
|
# need to dump leading/trailing spaces and clear out color codes for irc output
|
||||||
sub(/^[[:space:]]+|[[:space:]]+$/,"",$0)
|
sub(/^[[:space:]]+|[[:space:]]+$/,"",$0)
|
||||||
gsub(/\[/,"(",$0)
|
# gsub(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/,"",$0) # leaving this pattern in case need it
|
||||||
gsub(/\]/,")",$0)
|
gsub(/\[([0-9];)?[0-9]+m/,"",$0)
|
||||||
print $0
|
print $0
|
||||||
}' <<< $repo_line )
|
}' <<< $repo_line )
|
||||||
if [[ -n $( grep '://' <<< $repo_line ) ]];then
|
if [[ -n $( grep '://' <<< $repo_line ) ]];then
|
||||||
|
|
Loading…
Reference in a new issue