#!/bin/sh PANE=$(tmux list-panes -F '#{?pane_active,#D,}' | tr -d '\n\r ') test -n "$TMUX_PANE" || exit 2 test "$TMUX_PANE" = "$PANE" || exit 2 if test -n "$1"; then tmux run-shell "tmux neww -d 'env FIND=\"$(printf '%s\n' "$1"|sed 's/[\$\\`"]/\\&/g')\" kweasy-pane #{pane_id}'" else tmux run-shell "tmux neww -d 'kweasy-pane #{pane_id}'" fi