Fixed SC2001 error, you also need to use \033 instead of pasting the character in.
This commit is contained in:
parent
0e7799ff7e
commit
4141531b22
1 changed files with 3 additions and 2 deletions
5
neofetch
5
neofetch
|
|
@ -39,7 +39,7 @@ sys_locale=${LANG:-C}
|
||||||
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
|
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
|
||||||
PATH=$PATH:/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec
|
PATH=$PATH:/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec
|
||||||
reset='\e[0m'
|
reset='\e[0m'
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch extglob
|
||||||
|
|
||||||
# Speed up script by not using unicode.
|
# Speed up script by not using unicode.
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
@ -3879,7 +3879,8 @@ print_ascii() {
|
||||||
line=${line//\\\\/\\}
|
line=${line//\\\\/\\}
|
||||||
line=${line//█/ }
|
line=${line//█/ }
|
||||||
# Use Regex through sed to remove color and formatting codes
|
# Use Regex through sed to remove color and formatting codes
|
||||||
line=$(echo "$line" | sed 's/\x1B\[[0-9;]*[JKmsu]//g')
|
search='\\033\[*([0-9;])[JKmsu]'
|
||||||
|
line=${line//$search/}
|
||||||
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
|
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
|
||||||
done <<< "${ascii_data//\$\{??\}}"
|
done <<< "${ascii_data//\$\{??\}}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue