diff options
Diffstat (limited to 'tmuxsh/fzf-speed')
-rwxr-xr-x | tmuxsh/fzf-speed | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tmuxsh/fzf-speed b/tmuxsh/fzf-speed new file mode 100755 index 0000000..8b72762 --- /dev/null +++ b/tmuxsh/fzf-speed @@ -0,0 +1,17 @@ +#!/usr/bin/env sh +# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry|odysee) +# https://www.youtube.com/user/gotbletu +# DESC: launch other fzf scripts in tmux +# DEMO: https://youtu.be/41JxYe70Xwo +# REQD: bind-key for tmux +# $EDITOR ~/.tmux.conf +# # tmux -V >= 3.2+ +# bind-key Tab capture-pane \; save-buffer /tmp/tmux-buffer \; delete-buffer \; display-popup -w 80% -h 60% -E "/path/to/fzf-speed" +# +# # tmux -V < 3.2 +# bind-key Tab capture-pane \; save-buffer /tmp/tmux-buffer \; delete-buffer \; split-window -Z "/path/to/fzf-speed" +# bind-key Tab capture-pane \; save-buffer /tmp/tmux-buffer \; delete-buffer \; split-window "/path/to/fzf-speed" + +DIR="${0%/*}" +SELECTED="$(find "$DIR" -maxdepth 1 -type f -exec basename {} \; | sort | grep '^_' | sed 's@\.@ @g' | column -s ',' -t | fzf -e -i --delimiter _ --with-nth='2..' --prompt="fzf-speed: " --info=default --layout=reverse --tiebreak=index | cut -d ' ' -f1)" +eval "${DIR}/${SELECTED},*" |