diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2025-08-06 07:23:11 -0500 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2025-08-06 07:23:11 -0500 |
| commit | 5ddd2890435190f8b08b33cdb8d6cb6ae7fde66b (patch) | |
| tree | 887f1decfba39dc889bc1d944ac2b7b3c5dfa2e1 /fzf-exec/fzf-exec.sh | |
| parent | 104fc729bb13ccc99a81a74dc08b313923e0e330 (diff) | |
fzf-exec mostly done
Diffstat (limited to 'fzf-exec/fzf-exec.sh')
| -rwxr-xr-x | fzf-exec/fzf-exec.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fzf-exec/fzf-exec.sh b/fzf-exec/fzf-exec.sh new file mode 100755 index 0000000..3085831 --- /dev/null +++ b/fzf-exec/fzf-exec.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +all_cmds() { + tmux list-commands -F $'#{command_list_name}#{?command_list_alias,\n#{command_list_alias},}' +} + +selected_cmd=$(all_cmds | fzf \ + --prompt : \ + --bind 'enter:accept-or-print-query,tab:replace-query,alt-backspace:clear-query' \ + --preview "tmux-doc.sh $(printf '{}' | cut -d' ' -f1)" +) + +tmux $(echo "$selected_cmd" | sed "s@~@$HOME@g") + |
