File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,28 @@ mapping for it::
200200The two can be combined, using the :ac: `combine ` action.
201201
202202
203+ Sessions with remote connections
204+ -------------------------------------
205+
206+ If you use the :doc: `ssh kitten </kittens/ssh >` to connect to remote computers,
207+ :ac: `save_as_session ` is smart enough to save the ssh kitten invocation to your
208+ session file, preserving the remote working directory and even the currently
209+ running program on the remote host! Try it, run kitty with::
210+
211+ kitty -o 'map f1 save_as_session --use-foreground-process --relocatable' --session <(echo "layout vertical\nlaunch\nlaunch")
212+
213+ Now in both windows, run::
214+
215+ kitten ssh localhost
216+
217+ To connect them both to a remote computer (replace ``localhost `` with another
218+ computer if you like). In one window change the directory to /tmp and in the
219+ other start some program. Then press :kbd: `F1 ` to save the session file.
220+ When you run the session file in another kitty instance you will see both
221+ windows re-created, as expected with the correct working directories and
222+ running programs.
223+
224+
203225Keyword reference
204226---------------------
205227
You can’t perform that action at this time.
0 commit comments