1
0
Fork 0
mirror of synced 2024-12-22 06:41:07 -05:00

made workaround for implementations of sed that don't understand -E more robust

also made it compatible with POSIX shells
This commit is contained in:
Gregory Pakosz 2019-06-09 12:40:37 +02:00
parent 8f808316b1
commit 915d4a3960

View file

@ -180,7 +180,8 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# if ! printf '' | sed -E 's///' 2>/dev/null; then
# if printf '' | sed -r 's///' 2>/dev/null; then
# sed () {
# command sed "${@/-E/-r}"
# n=$#; while [ "$n" -gt 0 ]; do arg=$1; shift; case $arg in -E*) arg=-r${arg#-E};; esac; set -- "$@" "$arg"; n=$(( n - 1 )); done
# command sed "$@"
# }
# fi
# fi