1
0
mirror of https://github.com/tmux-plugins/tmux-resurrect.git synced 2024-06-30 08:10:58 +02:00
Commit Graph

155 Commits

Author SHA1 Message Date
Mohammad Alsaleh
655ed8c6f4
Add @resurrect-save-shell-history option
Also make @resurrect-save-bash-history an alias to the new option.

Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
2017-06-04 00:16:51 +02:00
Mohammad Alsaleh
e757e1b8a9
Add zsh support in save/restore functions
Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
2017-06-04 00:15:01 +02:00
Bruno Sutic
fbed36ad0e
Allow using '$HOSTNAME' in @resurrect-dir
Closes #197
2017-06-01 17:35:00 +02:00
Bruno Sutic
eef844c747
Memoize return of resurrect path functions 2017-06-01 17:03:39 +02:00
Bruno Sutic
b7a4ee2a40
Pane contents save and restore in separate dirs 2017-06-01 05:47:09 +02:00
Bruno Sutic
ba59a2b642
Revert "remove pane contents cleanup to repair restore"
This reverts commit 0a6f90788f.
2017-05-30 06:14:21 +02:00
Bruno Sutic
573897cd71
Revert "Remove pane_content_files_cleanup function"
This reverts commit 7a8d90a27d.
2017-05-30 06:11:41 +02:00
Bruno Sutic
7a8d90a27d
Remove pane_content_files_cleanup function 2017-05-30 05:49:51 +02:00
Bruno Sutic
8de2570960 Merge pull request #193 from Mellbourn/restore-pane-fix
remove pane contents cleanup to repair restore
2017-05-30 05:49:13 +02:00
Bruno Sutic
1a3a094265
Make send-keys more reliable
Thanks @mk12 for the PR
https://github.com/tmux-plugins/tmux-resurrect/pull/180
2017-05-30 05:43:12 +02:00
Bruno Sutic
40c776c747 Merge pull request #194 from Mellbourn/remove-terminal-clearing
remove terminal clearing since it collides with capture-pane-contents
2017-05-30 05:31:27 +02:00
Bruno Sutic
b1f3df21e9
Create new file only if there are changes
Code submitted by @vburdo in
https://github.com/tmux-plugins/tmux-resurrect/issues/156
2017-05-30 05:14:14 +02:00
Bruno Sutic
5722856e54
Fix bug for restoring commands on tmux 2.5 2017-05-30 02:05:23 +02:00
Klas Mellbourn
0a6f90788f remove pane contents cleanup to repair restore
as suggested in https://github.com/tmux-plugins/tmux-resurrect/issues/141
2017-05-07 19:35:06 +02:00
Klas Mellbourn
71fd3c8dd2 remove terminal clearing since it collides with capture-pane-contents 2017-05-06 00:37:13 +02:00
Heath Naylor
3bc852bbae Fix comparision operators. Fixes #124 2016-01-29 09:41:52 -07:00
Bruno Sutic
370b4861cb Revert "Symlink 'last' file at the end of successful save"
This reverts commit 6750a88e74.
2015-11-25 13:42:37 +01:00
Bruno Sutic
6750a88e74
Symlink 'last' file at the end of successful save 2015-11-25 13:40:54 +01:00
Bruno Sutic
5f04ceabbc
Add sleep when saving zoomed windows
When saving zoomed windows:

- window is un-zoomed
- window layout snapshot is taken
- window is zoomed back

This is done because otherwise tmux does not provide correct window
layout. With this we're working around a tmux bug really.

The above causes an issue with vim. For some reason vim cannot properly
reload it's content when "un-zoom + zoom" is done quickly. Everything
works ok if a little sleep/wait is added, so we're doing just that.
0.1 second sleep seems to be enough.

About `sleep 0.1 || sleep 1`: this is a hack. We want to wait for 0.1
seconds, which seems to be enough to fix the issue. However, according
to POSIX, `sleep` command takes only integers.
BUT, decimal values seem to work everywhere. So, we're using a decimal
value, and if that fails, we behave POSIX friendly.

Related to issue #112.
2015-10-26 01:22:46 +01:00
Bruno Sutic
06b8ad744a
Mutt added to the list of automatically restored programs 2015-08-14 19:23:36 +02:00
Bruno Sutic
e81f8e5f37
More portable pane_capture archiving 2015-07-10 19:29:40 +02:00
Bruno Sutic
a47236d247
Implement pane content files compression 2015-07-10 18:01:20 +02:00
Bruno Sutic
a750628a44
Change 'save pane contents' directory 2015-07-08 00:14:40 +02:00
Bruno Sutic
74773bed62
Save pane contents only if pane not blank 2015-07-08 00:02:20 +02:00
Bruno Sutic
aa0b424ca6
Refactoring 2015-07-07 23:35:41 +02:00
Bruno Sutic
852af79075
Do not save empty trailing lines when pane content is saved 2015-07-07 19:23:47 +02:00
Bruno Sutic
6fe70853a5
Expand tilde in @resurrect-dir
Fixes #74
2015-07-07 18:23:43 +02:00
Dmitry Motylev
ed6fb9b523
try to treat inline strategy as alias for strategy
if strategy with that name exists apply it otherwise use it as inline
strategy

Closes #88
2015-06-11 15:29:13 +02:00
Bruno Sutic
8af7aed9b3
Bugfix for pane contents restoration 2015-05-12 13:31:13 +02:00
Bruno Sutic
f3c6321501
Refactoring: drop dependency on command 2015-05-09 15:05:30 +02:00
Bruno Sutic
c85a3b4487
Improve pane content restore: remove extra cat 2015-05-09 14:05:51 +02:00
Bruno Sutic
fee40e2121
Capture pane contents feature, small refactor 2015-05-09 12:37:37 +02:00
quentin
737568922b Make "full" pane contents saving the default 2015-03-18 22:38:38 +01:00
quentin
a1e3d37461 Correctly capture wrapped lines in the pane contents
Add the -J options to `capture-pane` to handle wrapped lines correctly.
This way wrapped lines will be joined upon capture and once restored,
will re-wrap upon pane size changes.
2015-03-18 10:14:20 +01:00
quentin
4f685d5c3d Add an option to save the full pane contents
By default only the visible pane area is captured and restored.
The @resurrect-pane-contents-area option lets the full pane area be
captured instead.
2015-03-17 04:13:54 +01:00
quentin
b22b2a7203 Save and restore tmux pane contents
This feature is controlled by the '@resurrect-capture-pane-contents'
option.
Currently only the visible area of each pane is saved and restored.
2015-03-17 03:17:37 +01:00
Bruno Sutic
b7e7669999
Improve fetching "window_layout" value
It's faster now.
2015-02-12 14:10:56 +01:00
Bruno Sutic
abad85f03b
Enable quiet saving 2015-02-12 12:53:19 +01:00
Bruno Sutic
e1b01ee4f9
Export script paths so that 'tmux-resurrect-auto' plugin can use them 2015-02-12 12:48:44 +01:00
Bruno Sutic
708cd49d31
Fix a zoomed windows related regression 2015-02-12 12:47:09 +01:00
Bruno Sutic
c4375bf642
Enable 'full restore' by overwriting a single pane 2015-02-10 15:16:26 +01:00
Bruno Sutic
ddf9c5ef87
Reorder function in restore script 2015-02-10 13:44:14 +01:00
Bruno Sutic
b91e18cb0e
Remove deprecated and key bindings 2015-02-10 12:56:23 +01:00
Bruno Sutic
028e7b7c2e
Refactoring: prefer using variable with tab character 2015-02-10 12:48:53 +01:00
Bruno Sutic
b502572a07
Restore active and alternate windows only if they are present in the 'last' file 2015-02-10 12:48:53 +01:00
Bruno Sutic
1c8efb034a
If there are no grouped sessions, do not output empty line 2015-02-10 12:48:53 +01:00
Bruno Sutic
95ec3c1d9b
Save and restore active and alternate windows for grouped sessions 2015-02-10 12:48:53 +01:00
Bruno Sutic
5dc22a4a9b
Restore grouped sessions 2015-02-10 12:48:53 +01:00
Bruno Sutic
bfc625e13f
Save grouped sessions
Grouped sessions are session started with the command
`tmux new-session -t <existing-session-name>`

Those sessions share the panes and windows with the existing, original
session.
We're making sure to identify and save grouped sessions.
On the other hand, we don't want to save panes and windows twice
2015-02-10 12:48:53 +01:00
Bruno Sutic
e8401ba305 Merge pull request #56 from cunha/master
allow relative paths in @resurrect-dir
2014-11-09 20:25:26 +01:00
Bruno Sutic
601366be6d
Support for restoring neovim sessions 2014-11-09 16:42:53 +01:00
Italo Cunha
831fc5a458 allow relative paths in @resurrect-dir
this has been tested to work with set -g @resurrect-dir '.tmux/resu rrect'
2014-11-07 11:52:21 -02:00
Bruno Sutic
059686ab6c Merge pull request #55 from rburny/master
Fixes to #51 and #52
2014-10-26 16:59:41 +01:00
Radoslaw Burny
fcf7ca13f0 Only save pane history if its not running any program (other than Bash
shell). Fixes a bug where 'history -w' was sent to pane running Bash
script.
2014-10-26 01:30:00 +02:00
Arno Mayrhofer
0b496dd228 Removing the last_resized variable
Instead resizing only if pane_active is set so we are sure the resizep
is called only once
2014-10-25 18:29:52 +02:00
Arno Mayrhofer
ad52ade4bf Preserving layout of zoomed windows across restores
The problem is that tmux list-window shows only the current pane layout
if a pane is maximized. This is a bug in tmux. In order to avoid this
bug we unzoom the window when saving and zoom in again after saving.
This implies that the Z flag is no longer set in list-windows, and so it
can't be used when restoring. Instead we use the Z flag of the panes
(which still have it) to restore the zoom.
2014-10-25 18:29:52 +02:00
Bruno Sutic
8684d4592b
Flag gate the bash history restore feature 2014-10-17 22:33:29 +02:00
Bruno Sutic
94985fc500
Extract save_shell_history to a separate function 2014-10-17 17:45:49 +02:00
Radoslaw Burny
81982b5114 Add bash history saving and restoring (first version).
This does not yet have flag to turn the feature off.
2014-10-17 17:14:33 +02:00
Bruno Sutic
a7fe9dcac3
Command line script that fully restores tmux environment 2014-09-24 14:33:46 +02:00
Bruno Sutic
ec9f68cad5
Quote arguments in tmux display-message 2014-09-24 14:30:05 +02:00
Bruno Sutic
94594efdb0
Small bugfix: text command arguments 2014-09-24 14:25:30 +02:00
Bruno Sutic
1b79eb2f63
Rename default strategy to ps 2014-09-21 15:12:35 +02:00
Bruno Sutic
9f7050aaae
Use a strategy when fetching pane full command 2014-09-20 23:47:15 +02:00
Bruno Sutic
1d09f07d2b
Remove dependency on pgrep; use ps to get process names
Fixes #43
2014-09-20 22:33:14 +02:00
Bruno Sutic
a0a3f2fd56
When a pane is not restored, don't restore it's program 2014-09-02 22:47:38 +02:00
Bruno Sutic
d606106f1c
Fix: command prompt not ideal after a restore
Fixes #36
2014-09-02 22:34:00 +02:00
Bruno Sutic
8368355240
Enable inline strategies when restoring programs 2014-09-01 20:32:27 +02:00
Bruno Sutic
af3cb5db2e
ctrl key mappings; deprecate alt keys 2014-08-31 11:35:58 +02:00
Bruno Sutic
3682cf6170
Bugfix: sourcing variables file 2014-08-30 21:43:08 +02:00
Bruno Sutic
19c981545e
Make the default program running list even more conservative 2014-08-30 00:15:15 +02:00
Bruno Sutic
2b259cf11a
Show spinner during the env save process 2014-08-29 19:51:47 +02:00
Bruno Sutic
bd095e739d
Change plugin name and all the variables 2014-08-29 18:59:14 +02:00
Bruno Sutic
cedd1292c1
Restore window zoom state
Close #25
2014-08-29 17:04:00 +02:00
Bruno Sutic
05cf790493
Enable restoring more panes per window
Closes #24
2014-08-29 16:16:21 +02:00
Bruno Sutic
f9ef86d604
Do not restore processes within existing panes
Closes #23
2014-08-29 15:50:18 +02:00
Bruno Sutic
9a6e4a1a2c
Make pane restorations idempotent 2014-08-29 12:49:06 +02:00
Bruno Sutic
bd13c9bae8
Clean out comments 2014-08-29 01:04:50 +02:00
Bruno Sutic
54f47a4015
Properly restore pane with top program
Fixes #17
2014-08-29 00:42:11 +02:00
Bruno Sutic
b8b87a6e29
Improve irb restore strategy
Fixes #21
2014-08-29 00:17:02 +02:00
Bruno Sutic
cfe8e7979b
Restoring programs with arguments; improve process matching
Closes #20, closes #19
2014-08-28 23:48:04 +02:00
Bruno Sutic
0da279e4cd
"vi, irb, pry" are restored by default 2014-08-28 14:35:49 +02:00
Bruno Sutic
884a5e9c19
Improve default restored program command matching 2014-08-28 13:53:09 +02:00
Bruno Sutic
18f4d1099e
Spin a spinner while tmux sessions are restored
Closes #16
2014-08-28 12:58:07 +02:00
Bruno Sutic
655bdb9a75
Refactor checking if tmux session file exists 2014-08-28 12:45:48 +02:00
Bruno Sutic
cde50d4d92
Command strategies; restore vim sessions
Closes #4
2014-08-28 00:43:31 +02:00
Bruno Sutic
1e945c2cac
Enable selectively restoring processes
- user can restore all processes with ':all:'
- user can selectively restore wanted processes

Closes #13
2014-08-27 16:19:36 +02:00
Bruno Sutic
7f50660918
User option for disabling pane process restoring 2014-08-27 13:12:32 +02:00
Bruno Sutic
cbf58ac613
Restore all pane processes
Close #3
2014-08-27 00:28:35 +02:00
Bruno Sutic
bcad7cd1ea
Bugfix: correct pane ordering in window 2014-08-26 20:57:53 +02:00
Bruno Sutic
4d5c0a2a0d
Improve active/alternate window restoring 2014-08-26 20:29:55 +02:00
Bruno Sutic
8051fb9d36
Restore pane layout for each window
Close #2
2014-08-26 20:19:34 +02:00
Bruno Sutic
8166fa2602
Restore active and alternate window for each session
Closes #12
2014-08-26 19:16:51 +02:00
Bruno Sutic
ecc42c5a56
Save and restore active pane
Active pane is restored for each window with multiple panes.

Closes #5
2014-08-26 18:54:39 +02:00
Bruno Sutic
aa8f323b8b
Improved handling of fields that can be empty 2014-08-26 17:51:56 +02:00
Bruno Sutic
c78a38803a
Bugfix: non-existing window names
Fixes #11
2014-08-26 17:28:40 +02:00
Bruno Sutic
877780eb02
Save and restore current and alternate session
Closes #6
2014-08-26 17:27:46 +02:00
Bruno Sutic
81ed0811b4
Error msg if saved session file doesn't exist
Close #9
2014-08-26 15:52:07 +02:00
Bruno Sutic
732d53cede
Support only Tmux v1.9 or greater
Closes #1
2014-08-26 15:47:31 +02:00
Bruno Sutic
5c2853a55f
Sessions directory is configurable
Close #10
2014-08-26 15:40:50 +02:00