mirror of
https://github.com/Morantron/tmux-fingers.git
synced 2024-06-30 08:01:00 +02:00
small changes in tmux-next send-keys breaking change
This commit is contained in:
parent
0325e70e3c
commit
695bbc7b3e
|
@ -90,6 +90,16 @@ function toggle_help() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function copy_result() {
|
||||||
|
local result="$1"
|
||||||
|
|
||||||
|
tmux set-buffer "$result"
|
||||||
|
|
||||||
|
if [ ! -z "$FINGERS_COPY_COMMAND" ]; then
|
||||||
|
echo -n "$result" | eval "nohup $FINGERS_COPY_COMMAND" > /dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
while read -rsn1 char; do
|
while read -rsn1 char; do
|
||||||
# Escape sequence, flush input
|
# Escape sequence, flush input
|
||||||
if [[ "$char" == $'\x1b' ]]; then
|
if [[ "$char" == $'\x1b' ]]; then
|
||||||
|
@ -133,19 +143,13 @@ while read -rsn1 char; do
|
||||||
show_hints "$fingers_pane_id" $compact_state
|
show_hints "$fingers_pane_id" $compact_state
|
||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(lookup_match "$input" | head -n 1)
|
result=$(lookup_match "$input")
|
||||||
|
|
||||||
if [[ -z $result ]]; then
|
if [[ -z $result ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmux display-message "'$result' copied!"
|
copy_result "$result"
|
||||||
|
|
||||||
if [ ! -z "$FINGERS_COPY_COMMAND" ]; then
|
|
||||||
echo -n "$result" | eval "nohup $FINGERS_COPY_COMMAND" > /dev/null
|
|
||||||
else
|
|
||||||
tmux set-buffer "$result"
|
|
||||||
fi
|
|
||||||
|
|
||||||
revert_to_original_pane "$current_pane_id" "$fingers_pane_id"
|
revert_to_original_pane "$current_pane_id" "$fingers_pane_id"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ export pane_output_temp
|
||||||
|
|
||||||
function lookup_match() {
|
function lookup_match() {
|
||||||
local input=$1
|
local input=$1
|
||||||
echo "$(cat $match_lookup_table | grep "^$input:" | sed "s/^$input://")"
|
echo "$(cat $match_lookup_table | grep "^$input:" | sed "s/^$input://" | head -n 1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_stdin() {
|
function get_stdin() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user