Closed dzhao closed 9 years ago
Hey,
I'd recommend just using tmux's native capture-pane
for this (that is what this plugin is built around). capture-pane
is well documented in man tmux
.
I think you'll end up with a command that looks something like this:
tmux capture-pane -J -p -t %123 > file.txt
The %123
is pane unique id. You can get that one by executing echo $TMUX_PANE
inside a target pane.
Hope that helps!
I'm going to close this one because it's more related to tmux than to this plugin.
right on.. thanks so much!
Still not sure what -J
is suppose to do, but -S -
works for my use
Here's a random script that might help someone find something in another pane, or the current pane from the command line:
tmux-findpane -- https://gist.github.com/bdowling/c42cb00397eff0d8f8ed625146ead676
alias tmux-history='tmux capture-pane -p -S -'
# especially useful when you want to save some output without re-running expensive commands or grep for something...
tmux-history | sed -e '/^From/,/End/' > save-to-file.
I need to periodically take a "textual" screen shot of say tmux pane 0. Is there a way I can trigger screen capture from command line? And better yet, is there a way for me to specify which window to capture(not necessarily the current window I am working on?) Thanks so much!