#!/bin/sh
tmux has-session -t path-extractor && tmux kill-session -t path-extractor || :
-tmux new-session -d -s path-extractor "
- ~/bin/pe < /tmp/tmux-buffer
- tmux detach
- sleep 20
-"
+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