Commit Graph

307 Commits

Author SHA1 Message Date
Anton
4e1cdfa169 feat: append socket path to resurrect_dir
BREAKING: will break existing sessions,
since session save location is changed.

Supposed migration path (to be tested):
while Tmux is running, remove previous version of resurrect
(remove from Tmux conf & TPM uninstall), then install this version,
then save your session.
2023-07-07 11:25:04 +08:00
Bruno Sutic
cff343cf9e
Merge pull request #474 from georgeanderson/master
Update description of default session location
2023-03-06 11:20:22 +01:00
George Guimares
4c1c0dcf85 Updated description of default session location.
- Include alternate location
- Include reference to `${XDB_DATA_HOME}` env variable
2023-03-05 20:58:11 -06:00
Bruno Sutic
6df04051fe
Merge pull request #469 from ktprograms/restore-arguments-misc-fixes
Restore with command arguments misc fixes
2023-01-31 10:40:52 +01:00
kt programs
299c4aa8ce docs: add info on asterisk (*) restore option 2023-01-30 10:50:07 +08:00
kt programs
b8ff2ea08b _get_proc_restore_command: use "," as sed delimiter
When command_arguments contains a path, there are too many delimiters
for sed, which causes it to not replace properly.

The result of this is that the original command gets executed without
remapping and/or expanding the arguments.
2023-01-30 10:37:15 +08:00
kt programs
4941cdb074 _get_command_arguments: make trailing space optional
When pane_full_command has no arguments, the regex doesn't find argv[0]
as there is no trailing space.

For example, if pane_full_command was "vim" and the restore option was
"~Vim->vim *", the command "vim vim" would get executed instead of just
"vim".

Make the trailing space optional to match having only the command
without arguments.
2023-01-30 10:37:15 +08:00
Bruno Sutic
a2ddfb96b9
Merge pull request #458 from oliverlew/xdg_dir
use XDG_DATA_HOME for resurrect-dir path
2022-10-22 16:31:55 +02:00
Lu Xu
dd36a4561b
use XDG_DATA_HOME for resurrect-dir path 2022-10-22 14:21:51 +08:00
Bruno Sutic
88297b4c3a
Merge pull request #455 from tfaughnan/ps-fix
ps.sh: fix ps arguments to work for busybox
2022-09-22 09:14:40 +02:00
Thomas Faughnan
45aa8feef6
ps.sh: fix ps arguments to work for busybox
Use the format specifier 'ppid,args' instead of 'ppid command'. POSIX
allows either spaces or commas as separators, but busybox only allows
commas. Furthermore, 'args' is recognized by POSIX[0] while 'command' is
not. On implementations of ps that do recognize 'command', it is simply
an alias for 'args', e.g. Debian[1] and FreeBSD[2].

[0]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html
[1]: https://manpages.debian.org/bullseye/procps/ps.1.en.html
[2]: https://www.freebsd.org/cgi/man.cgi?query=ps
2022-09-20 18:30:28 -04:00
Bruno Sutic
75458f91c8
Merge pull request #450 from mdeguzis/master
Use bash subshell for procfs interpolation of cmdline file
2022-08-17 09:09:56 +02:00
Michael T. DeGuzis
1431ba6fbe Use bash subshell for procfs interpolation of cmdline file 2022-08-16 08:57:39 -04:00
Bruno Sutic
3606e4f602
Merge pull request #443 from rbren/master
Fix for restoring bash history
2022-07-16 13:55:50 +02:00
Robert Brennan
7f5fa4bed2
Update restoring_bash_history.md 2022-07-15 16:36:24 -04:00
Bruno Sutic
74d9112314
Merge pull request #442 from rbren/master
Create restoring_bash_history.md
2022-06-26 09:18:44 +02:00
Robert Brennan
8101d98358
Create restoring_bash_history.md 2022-06-25 16:33:19 -04:00
Bruno Sutic
ca6468e2de
Fix restoring active/alternate windows 2022-05-01 17:32:14 +02:00
Bruno Sutic
6050d2d8d8
Remove deprecated "restoring shell history" 2022-04-10 08:58:27 +02:00
Bruno Sutic
e87d7d592c
v4.0.0 2022-04-10 08:40:19 +02:00
Bruno Sutic
5b5e6ca7b1
Merge pull request #431 from Hologos/feature/save-pane-title
Adds support for saving and restoring pane titles.
2022-04-10 08:39:15 +02:00
Jiří Málek
1ad109d3a8
Adds support for saving and restoring pane titles. 2022-04-09 13:52:28 +02:00
Bruno Sutic
027960ad25
Explain delayed pane content cleanup 2021-12-19 16:21:44 +01:00
Bruno Sutic
dc6252d950
Merge pull request #422 from cartoonist/master
Fix #141
2021-12-19 16:19:30 +01:00
Ali Ghaffaari
c3d0599a6e Fix #141
The issue apprently happens when using fish as the default shell. This commit
fixes this issue by postponing `restore/pane_contents` clean-up after calling
`restore_active_pane_for_each_window` (scripts/restore.sh:392). It might also
fix #192.
2021-12-19 12:50:20 +01:00
Bruno Sutic
6be2f34b5f
automatic-rename: changelog and comments 2021-08-30 14:17:15 +02:00
Bruno Sutic
4234ba99aa
Merge pull request #401 from Farzat07/automatic-rename2
Maintain the value of automatic-rename
2021-08-30 14:07:33 +02:00
Bruno Sutic
003a7cddbb
v3.0.0 2021-08-30 14:06:58 +02:00
A Farzat
3e8fbdf7aa Make window_name variable local in restoring func
In restore_window_properties function, the window_name is set globally
at first, but now it is first declared as local to prevent that from
happening.
2021-08-27 18:02:00 +09:00
A Farzat
1b63a940a0 Fix even more bugs in before last commit
First, increment the relevant indices in the awk statements regarding
windows, as now the window_name entry exists.

Second, remove the window_name entry from the dump_pane_contents and
dump_shell_history functions as it no longer exists in the format.
2021-08-27 15:57:26 +09:00
A Farzat
02a7f1f9d6 Fix some of the errors in the last commit
First, make sure to include the ":" placeholder in the window_name
format.

Second, decrement the indices in relevant awk commands to make sure they
point to the right items.
2021-08-27 13:27:00 +09:00
A Farzat
6c9322aa99 Leave window name handling to windows
Previously, window names were set when creating panes and were therefore
saved with pane data. However, saving the names with window data is more
intuitive and easier to manage. In addition, one can set the name and
automatic-rename options in the same function, so one can make sure that
renaming the windows will not overwrite the automatic-rename option.
2021-08-26 07:00:49 +09:00
A Farzat
80adb917c1 Maintain the value of automatic-rename
When the session is restored, the windows are renamed to their original
names switching off automatic-rename, which can be undesirable.
Therefore the value of automatic-rename is now saved for each window and
restored after the renaming.

If the value is set, that value is saved and then applied. Otherwise, a
placeholder of ':' is placed instead, in which case the local option is
unset for that window (as it originally was).
2021-08-23 14:04:11 +09:00
Yordan Georgiev
716b958145
enable tilde expansion ( aka ~ ) into /home/ubuntu in saved session files's paths 2021-07-05 09:53:56 +02:00
Bruno Sutic
abbc4fbfc4
Merge pull request #381 from chrysn-pull-requests/doc-improvement
More explicit warning of restoring :all: programs
2021-03-18 11:52:35 +01:00
chrysn
dff7b2d2ae More explicit warning of restoring :all: programs
Closes: https://github.com/tmux-plugins/tmux-resurrect/issues/250
2021-03-17 12:54:21 +01:00
Bruno Sutic
1c0eae57c8
Merge pull request #325 from alfredbez/master
How to restore to a previously saved environment
2021-03-13 11:49:28 +01:00
alfredbez
afcddf8b9e Add link to how-to restore to a previously saved environment 2021-03-12 13:10:21 +01:00
Bruno Sutic
4a36ded50f
Merge pull request #376 from coldeasy/patch-1
Add extra detail around using MacVim
2021-02-02 16:00:52 +01:00
Colin Deasy
76656c510b
Add extra detail around using MacVim 2021-02-01 15:34:21 +00:00
Bruno Sutic
e4825055c9
Merge pull request #361 from diegoximenes/fix/restore_window_renaming
Fix rename-window's target-window during restore
2020-09-18 10:59:01 +02:00
Diego Ximenes
b6cbf652c4 Fix rename-window's target-window during restore 2020-09-18 00:47:32 -03:00
Bruno Sutic
123d83c668
Do not output deleted files to stdout 2020-08-17 10:32:11 +02:00
Ash Berlin-Taylor
e815c50f13
Make backup retention period configurable
For instance `tmux set-option -g @resurrect-delete-backup-after 1`
to only keep 1 day of backups.

Closes 252.
2020-08-17 10:28:42 +02:00
Bruno Sutic
5f5f9d8fd5
Kill session 0 if it's not restored 2020-08-03 08:58:41 +02:00
Bruno Sutic
78d67e4dcb
Merge pull request #211 from malkomalko/mm-rename-window
actually rename windows when restoring
2020-07-27 09:18:18 +02:00
Bruno Sutic
da1a755802
Whitespace cleanup 2020-06-14 11:37:47 +02:00
Bruno Sutic
e4e21f3f48
Restore command args for inline strategies with '*'
Example inline strategy: "~/bin/my_program->my_program *"
for full command: "ruby /Users/john/bin/my_program arg1 arg2"
restores command: "my_program arg1 arg2"
2020-06-14 11:33:31 +02:00
Bruno Sutic
bd671b83dc
Don't be too smart when restoring vim session
A user may decide to use custom session file. Eg vim -S Session1.vim
With the previous approach we were preventing that as we only checked
for the existence of the default Session.vim file.
2020-06-05 09:24:42 +02:00
Bruno Sutic
327c0481ad
Add 'view' to the list of restored processes 2020-03-21 23:51:59 +01:00