[PR] #171 from OldWorldOrdr/fix-sed
use sed -r instead of -E when using GNU sed
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user