[PR] #171 from OldWorldOrdr/fix-sed

use sed -r instead of -E when using GNU sed
This commit is contained in:
Azalea 2023-09-26 07:42:19 -07:00 committed by GitHub
commit b1df896e44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,16 @@ LANG=C
# Fix issues with gsettings. # Fix issues with gsettings.
[[ -z $GIO_EXTRA_MODULES ]] && export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/ [[ -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. # Neofetch default config.
read -rd '' config <<'EOF' read -rd '' config <<'EOF'
# See this wiki page for more info: # See this wiki page for more info: