Workable preview in tmux-path-extractor
authorSergey Matveev <stargrave@stargrave.org>
Fri, 5 Feb 2021 13:27:10 +0000 (16:27 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 5 Feb 2021 13:27:10 +0000 (16:27 +0300)
bin/bin/tmux-path-extractor.sh
tmux/.tmux.conf

index 162f0bb0353c270c20f41fc1e3e651c825957d00..ed2cebcf8c54a52baa3e607f4b5ba61ecabfff2a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
 tmux has-session -t path-extractor && tmux kill-session -t path-extractor || :
 #!/bin/sh
 
 tmux has-session -t path-extractor && tmux kill-session -t path-extractor || :
-tmux new-session -d -s path-extractor "pe < /tmp/tmux-buffer ; tmux detach"
+tmux new-session -d -s path-extractor -c "$1" "pe < /tmp/tmux-buffer ; tmux detach"
 tmux set-option -t path-extractor status off
 exec tmux attach-session -t path-extractor
 tmux set-option -t path-extractor status off
 exec tmux attach-session -t path-extractor
index a107fe21e619e0975baedb5bcd12a00fa32fd976..db063c9658656f5ae4b0294eee1acdd46c528513 100644 (file)
@@ -60,7 +60,7 @@ bind-key o {
     capture-pane -J
     save-buffer /tmp/tmux-buffer
     delete-buffer
     capture-pane -J
     save-buffer /tmp/tmux-buffer
     delete-buffer
-    display-popup -KE -w 100% -R "~/bin/tmux-path-extractor.sh"
+    display-popup -KE -w 100% -R "~/bin/tmux-path-extractor.sh '#{pane_current_path}'"
     paste-buffer
     delete-buffer
 }
     paste-buffer
     delete-buffer
 }