[PR] #171 from OldWorldOrdr/fix-sed
use sed -r instead of -E when using GNU sed
This commit is contained in:
commit
b1df896e44
1 changed files with 10 additions and 0 deletions
10
neofetch
10
neofetch
|
@ -48,6 +48,16 @@ LANG=C
|
|||
# Fix issues with gsettings.
|
||||
[[ -z $GIO_EXTRA_MODULES ]] && export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/
|
||||
|
||||
# Use sed -r instead of sed -E if using GNU sed.
|
||||
[[ $(sed --version 2>/dev/null) =~ GNU ]] && gnu_sed=1
|
||||
sed() {
|
||||
if [[ $gnu_sed ]]; then
|
||||
command sed "${@//-E/-r}"
|
||||
else
|
||||
command sed "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Neofetch default config.
|
||||
read -rd '' config <<'EOF'
|
||||
# See this wiki page for more info:
|
||||
|
|
Loading…
Reference in a new issue