lotabout / skim

Fuzzy Finder in rust!
MIT License
5.1k stars 183 forks source link

`sk-tmux -p` fails with no output #541

Open gifnksm opened 1 year ago

gifnksm commented 1 year ago

sk-tmux -p fails with no output.

After applying the following patch, the following error was output.

--- sk-tmux.orig        2023-09-17 15:49:03.278476929 +0900
+++ sk-tmux     2023-09-17 15:41:58.568330575 +0900
@@ -1,5 +1,7 @@
 #!/usr/bin/env bash

+set -x
+
 # The MIT License (MIT)
 #
 # Copyright (c) 2019 Jinzhou Zhang
@@ -230,7 +232,8 @@
     cat <<< "\"$sk\" $opts < $fifo1 > $fifo2; out=\$? $close; exit \$out" >> $argsf
     cat <&0 > $fifo1 &
   fi
-  tmux popup -d "$PWD" "${tmux_args[@]}" $opt -R "bash $argsf" > /dev/null 2>&1
+  tmux popup -d "$PWD" "${tmux_args[@]}" $opt -R "bash $argsf"
   exit $?
 fi
$ ./sk-tmux -p
...
+ tmux popup -d /home/nksm -K -E -R 'bash /tmp/sk-args-15557'
command display-popup: unknown flag -K

Environment

$ tmux -V
tmux 3.3a
$ sk --version
sk 0.10.4
$ sk-tmux --version
sk-tmux (with sk sk 0.10.4)
gifnksm commented 1 year ago

fzf-tmux with following patch works fine.

--- fzf-tmux    2023-09-17 15:54:53.633685935 +0900
+++ fzf-tmux.orig       2023-09-17 15:54:41.733233068 +0900
@@ -7,7 +7,7 @@
   exit 2
 }

-fzf="$(command -v sk 2> /dev/null)" || fzf="$(dirname "$0")/sk"
+fzf="$(command -v fzf 2> /dev/null)" || fzf="$(dirname "$0")/fzf"
 [[ -x "$fzf" ]] || fail 'fzf executable not found'

 args=()