irongit

Find and execute tmux commands rather view a list with the ? key binding. A great way to memorize the keys.

tmux-fzf-keys/scripts/get_and_run.sh
15 lines398 BBourne Again Shell (bash)
1#!/bin/bash
2get_and_run() {
3 local selection=$(
4 tmux list-keys |
5 fzf --header=$'\nFuzzy trigger any tmux command\n to run | Esc to quit' \
6 --preview="echo {}" \
7 --border \
8 --preview-window=down:3:wrap
9 )
10 local command=$(echo $selection |
11 awk '{ $1=""; $2=""; $3=""; $4=""; print $0 }' |
12 sed 's/^ *//')
13 tmux run-shell "tmux $command"
14}
15get_and_run