nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/tmux-thumbs.sh b/tmux-thumbs.sh
2index 34dd528..8c05d54 100755
3--- a/tmux-thumbs.sh
4+++ b/tmux-thumbs.sh
5@@ -1,22 +1,8 @@
6 #!/usr/bin/env bash
7 set -Eeu -o pipefail
8
9-VERSION=$(grep 'version =' Cargo.toml | grep -oe "[0-9]\+.[0-9]\+.[0-9]\+")
10-
11 # Setup env variables to be compatible with compiled and bundled installations
12 CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
13-RELEASE_DIR="${CURRENT_DIR}/target/release"
14-
15-THUMBS_BINARY="${RELEASE_DIR}/thumbs"
16-TMUX_THUMBS_BINARY="${RELEASE_DIR}/tmux-thumbs"
17-
18-if [ ! -f "$THUMBS_BINARY" ]; then
19- tmux split-window "cd ${CURRENT_DIR} && bash ./tmux-thumbs-install.sh"
20- exit
21-elif [[ $(${THUMBS_BINARY} --version) != "thumbs ${VERSION}" ]]; then
22- tmux split-window "cd ${CURRENT_DIR} && bash ./tmux-thumbs-install.sh update"
23- exit
24-fi
25
26 function get-opt-value() {
27 tmux show -vg "@thumbs-${1}" 2> /dev/null
28@@ -36,7 +22,7 @@ function get-opt-arg() {
29 fi
30 }
31
32-PARAMS=(--dir "${CURRENT_DIR}")
33+PARAMS=(--dir @tmuxThumbsDir@)
34
35 function add-param() {
36 local type opt arg
37@@ -51,4 +37,4 @@ add-param upcase-command string
38 add-param multi-command string
39 add-param osc52 boolean
40
41-"${TMUX_THUMBS_BINARY}" "${PARAMS[@]}" || true
42+@tmuxThumbsDir@/tmux-thumbs "${PARAMS[@]}" || true
43
44
45