From 350a3bafa85b78d13ba78b56ca1768af56fc32df Mon Sep 17 00:00:00 2001 From: John Kurkowski Date: Sun, 21 May 2017 17:10:54 -0700 Subject: [PATCH] Extend regular expressions to appease BSD sed BSD sed with only basic regular expressions did not like the `\?`. Use extended regular expressions and simplify the regex escaping. Works with both BSD & GNU sed. --- scripts/fingers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fingers.sh b/scripts/fingers.sh index 0a0901a..1a8cee2 100755 --- a/scripts/fingers.sh +++ b/scripts/fingers.sh @@ -10,7 +10,7 @@ source $CURRENT_DIR/help.sh FINGERS_COPY_COMMAND=$(tmux show-option -gqv @fingers-copy-command) HAS_TMUX_YANK=$([ "$(tmux list-keys | grep -c tmux-yank)" == "0" ]; echo $?) -tmux_yank_copy_command=$(tmux_list_vi_copy_keys | grep -E "(vi-copy|copy-mode-vi) *y" | sed 's/.*copy-pipe\(-and-cancel\)\? *"\(.*\)".*/\2/g') +tmux_yank_copy_command=$(tmux_list_vi_copy_keys | grep -E "(vi-copy|copy-mode-vi) *y" | sed -E 's/.*copy-pipe(-and-cancel)? *"(.*)".*/\2/g') current_pane_id=$1 fingers_pane_id=$2