File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
33### master
4+ - update to support \* THE\* latest tmux version
45- bugfix for ` prefix + R ` key binding
56
67### v2.2.0, 2015-02-10
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44
55ALMOST_SENSIBLE_OPTION=" @almost-sensible"
66
7+ # used to match output from `tmux list-keys`
8+ KEY_BINDING_REGEX=" bind-key[[:space:]]\+\(-r[[:space:]]\+\)\?\(-T prefix[[:space:]]\+\)\?"
9+
710is_osx () {
811 local platform=$( uname)
912 [ " $platform " == " Darwin" ]
@@ -41,7 +44,7 @@ server_option_value_not_changed() {
4144
4245key_binding_not_set () {
4346 local key=" $1 "
44- if $( tmux list-keys | grep -q " bind-key[[:space:]]\+\(-r[[:space:]]\+\)\? ${key} [[:space:]]" ) ; then
47+ if $( tmux list-keys | grep -q " ${KEY_BINDING_REGEX} ${key} [[:space:]]" ) ; then
4548 return 1
4649 else
4750 return 0
@@ -51,7 +54,7 @@ key_binding_not_set() {
5154key_binding_not_changed () {
5255 local key=" $1 "
5356 local default_value=" $2 "
54- if $( tmux list-keys | grep -q " bind-key[[:space:]]\+ ${key} [[:space:]]\+${default_value} " ) ; then
57+ if $( tmux list-keys | grep -q " ${KEY_BINDING_REGEX} ${key} [[:space:]]\+${default_value} " ) ; then
5558 # key still has the default binding
5659 return 0
5760 else
You can’t perform that action at this time.
0 commit comments