small changes in tmux-next send-keys breaking change
This commit is contained in:
parent
0fd04a9647
commit
57f0b731a6
|
@ -90,6 +90,16 @@ function toggle_help() {
|
|||
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
|
||||
# Escape sequence, flush input
|
||||
if [[ "$char" == $'\x1b' ]]; then
|
||||
|
@ -133,19 +143,13 @@ while read -rsn1 char; do
|
|||
show_hints "$fingers_pane_id" $compact_state
|
||||
fi
|
||||
|
||||
result=$(lookup_match "$input" | head -n 1)
|
||||
result=$(lookup_match "$input")
|
||||
|
||||
if [[ -z $result ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
tmux display-message "'$result' copied!"
|
||||
|
||||
if [ ! -z "$FINGERS_COPY_COMMAND" ]; then
|
||||
echo -n "$result" | eval "nohup $FINGERS_COPY_COMMAND" > /dev/null
|
||||
else
|
||||
tmux set-buffer "$result"
|
||||
fi
|
||||
copy_result "$result"
|
||||
|
||||
revert_to_original_pane "$current_pane_id" "$fingers_pane_id"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ export pane_output_temp
|
|||
|
||||
function lookup_match() {
|
||||
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() {
|
||||
|
|
Loading…
Reference in New Issue