=== removed file 'tmux-capture-prompt' --- tmux-capture-prompt 2013-05-03 23:19:08 +0000 +++ tmux-capture-prompt 1970-01-01 00:00:00 +0000 @@ -1,34 +0,0 @@ -#!/bin/zsh -tmux capture-pane -S -9999 -had_prompt=0 -back=() -lines=() -tmux save-buffer - | cat | while read line; do - case $line in - ($~1) had_prompt=1;; - ('') - if (($had_prompt)); then - continue - else - lines+=$line - fi - ;; - (*) - if (($had_prompt)); then - if ((${#lines})); then - back+=${(F)lines} - fi - lines=( $line ) - had_prompt=0 - else - lines+=$line - fi - ;; -esac -done - -if [[ -n "$2" ]]; then - print -r - $back[$2] -else - print -rl - $lines -fi