mirror of
https://github.com/tmux-plugins/tmux-logging.git
synced 2026-09-10 07:16:28 -04:00
Use flag to get buffer history size
This commit is contained in:
parent
2625de7c2e
commit
08fa1b52c4
|
|
@ -3,6 +3,8 @@
|
|||
### master
|
||||
- `capture-pane` gets a `-J` flag. It joins wrapped lines and preserves trailing
|
||||
spaces at each line's end.
|
||||
- when capturing whole history, do not guess its size, but get it from
|
||||
`#{history_limit}` format flag
|
||||
|
||||
### v2.0.0, 2015-03-14
|
||||
- update readme
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ capture_pane() {
|
|||
local file="$(get_path)/$(get_filename)"
|
||||
local capture_scope=$1
|
||||
if [ $capture_scope == "History" ]; then
|
||||
# copying 9M lines back will hopefully fetch the whole scrollback
|
||||
tmux capture-pane -J -S -9000000 -p > "$file"
|
||||
local history_limit="$(tmux display-message -p -F "#{history_limit}")"
|
||||
tmux capture-pane -J -S "-${history_limit}" -p > "$file"
|
||||
elif [[ $capture_scope == "Screen capture" ]]; then
|
||||
tmux capture-pane -J -p > "$file"
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue