From 04317b6c05cdb90d70ee868e853865c7d078e28c Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Mon, 4 May 2026 11:21:46 -0500 Subject: slight changes --- fzf-exec/README.md | 4 ++-- fzf-exec/fzf-exec.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fzf-exec/README.md b/fzf-exec/README.md index 49dc680..bbe2e6d 100644 --- a/fzf-exec/README.md +++ b/fzf-exec/README.md @@ -7,10 +7,10 @@ fzf-exec replaces the tmux command prompt with a vertico-style completion menu f First, clone this repo to a known location, such as `~/.config/tmux/m`. ```sh cd ~/.config/tmux -git clone https://bluedragon1221/tmux-minibuffer m +git clone https://github.com/bluedragon1221/tmux-minibuffer m ``` -Now, you can add a keybinding to launch fzf-exec: +Now, you can add a keybinding to launch `fzf-exec`: ```sh bind-key -T prefix : run-shell "~/.config/tmux/m/minibuffer.sh -h 10 '~/.config/tmux/m/fzf-exec/fzf-exec.sh'" ``` diff --git a/fzf-exec/fzf-exec.sh b/fzf-exec/fzf-exec.sh index 3085831..177e78b 100755 --- a/fzf-exec/fzf-exec.sh +++ b/fzf-exec/fzf-exec.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + all_cmds() { tmux list-commands -F $'#{command_list_name}#{?command_list_alias,\n#{command_list_alias},}' } @@ -6,7 +8,7 @@ all_cmds() { 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)" + --preview "$SCRIPT_DIR/tmux-doc.sh $(printf '{}' | cut -d' ' -f1)" ) tmux $(echo "$selected_cmd" | sed "s@~@$HOME@g") -- cgit v1.3.1