From 915d4a39608e7c3eefab6f3ff02c722f99d1d065 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sun, 9 Jun 2019 12:40:37 +0200 Subject: [PATCH] made workaround for implementations of sed that don't understand -E more robust also made it compatible with POSIX shells --- .tmux.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index ae6b6db..6c3d037 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -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