Skip to content

Commit 299c4aa

Browse files
committed
docs: add info on asterisk (*) restore option
1 parent b8ff2ea commit 299c4aa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/restoring_programs.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ contains space-separated list of additional programs to restore.
2828

2929
set -g @resurrect-processes 'some_program "grunt->grunt development"'
3030

31+
- Use `*` to expand the arguments from the saved command when restoring:
32+
33+
set -g @resurrect-processes 'some_program "~rails server->rails server *"'
34+
3135
- Don't restore any programs:
3236

3337
set -g @resurrect-processes 'false'
@@ -96,6 +100,20 @@ command name".
96100
Full (long) process name is now ignored and you'll see just `rails server` in
97101
the command line when the program is restored.
98102

103+
> What is asterisk `*` and why is it used?
104+
105+
(Please read the above clarifications about tilde `~` and arrow `->`).
106+
107+
Continuing with the `rails server` example, you might have added flags for e.g.
108+
verbose logging, but with the above configuration, the flags would be lost.
109+
110+
To preserve the command arguments when restoring, use the asterisk `*`: (**note**: there **must** be a space before `*`)
111+
112+
set -g @resurrect-processes '"~rails server->rails server *"'
113+
114+
This option says: "when this process is restored use `rails server` as the
115+
command name, but preserve its arguments".
116+
99117
> Now I understand the tilde and the arrow, but things still don't work for me
100118
101119
Here's the general workflow for figuring this out:

0 commit comments

Comments
 (0)