mirror of
https://github.com/roosta/tmux-fuzzback.git
synced 2026-09-10 07:36:29 -04:00
As pointed out by @k-kuroguro, the `-K` option isn't supported before
tmux 3.1, so I modified the supported.sh script to handle conditionally
setting this option on init
Refs:
1905afb3d8/CHANGES (L806C1-L811C28)
https://github.com/roosta/tmux-fuzzback/issues/24
20 lines
580 B
Bash
Executable file
20 lines
580 B
Bash
Executable file
#!/usr/bin/env bash
|
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
# shellcheck source=scripts/helpers.sh
|
|
. "$CURRENT_DIR/scripts/helpers.sh"
|
|
|
|
support_note() {
|
|
"$CURRENT_DIR/scripts/supported.sh" "3.1" "" 0 # Pass 0 to suppress message
|
|
return $?
|
|
}
|
|
|
|
key="$(tmux_get '@fuzzback-bind' '?')"
|
|
table="$(tmux_get '@fuzzback-table' 'prefix')"
|
|
|
|
if support_note; then
|
|
tmux bind-key -N "Fuzzback through pane history" -T "$table" "$key" run -b "$CURRENT_DIR/scripts/fuzzback.sh";
|
|
else
|
|
tmux bind-key -T "$table" "$key" run -b "$CURRENT_DIR/scripts/fuzzback.sh";
|
|
fi
|