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:
parent
8f808316b1
commit
915d4a3960
1 changed files with 2 additions and 1 deletions
|
@ -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 -E 's///' 2>/dev/null; then
|
||||||
# if printf '' | sed -r 's///' 2>/dev/null; then
|
# if printf '' | sed -r 's///' 2>/dev/null; then
|
||||||
# sed () {
|
# 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
|
||||||
# fi
|
# fi
|
||||||
|
|
Loading…
Reference in a new issue