Skip to content

Commit 99c1f5e

Browse files
florommelSbozzolo
authored andcommitted
Add README entry for vterm-tramp-shells
1 parent f64729e commit 99c1f5e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,34 @@ fake-newlines are removed on entering copy-mode and re-inserted
482482
on leaving copy mode. Also truncate-lines is set to t on entering
483483
copy-mode and set to nil on leaving.
484484
485+
## `vterm-tramp-shells`
486+
487+
The shell that gets run in the vterm for tramp.
488+
489+
This has to be a list of pairs of the format:
490+
`(TRAMP-METHOD SHELL)`
491+
492+
The `TRAMP-METHOD` is a method string as used by tramp (e.g., `"ssh"`).
493+
Use t as `TRAMP-METHOD` to specify a default shell for all methods.
494+
Specific methods always take precedence over `t`.
495+
496+
Set SHELL to `'login-shell` to use the user's login shell on the remote host.
497+
The login-shell detection currently works for POSIX-compliant remote hosts that
498+
have the `getent` command (regular GNU/Linux distros, *BSDs, but not MacOS X
499+
unfortunately).
500+
You can specify an additional second `SHELL` command as a fallback
501+
that is used when the login-shell detection fails, e.g.,
502+
`'(("ssh" login-shell "/bin/bash") ...)`
503+
If no second `SHELL` command is specified with `'login-shell`, vterm will
504+
fall back to tramp's shell.
505+
506+
Examples:
507+
- Usee the default login shell for all methods, except for docker.
508+
`'((t login-shell) ("docker" "/bin/sh"))`
509+
- Use the default login shell for ssh and scp, fall back to "/bin/bash".
510+
Use tramp's default shell for all other methods.
511+
`'(("ssh" login-shell "/bin/bash") ("scp" login-shell "/bin/bash"))`
512+
485513
## Keybindings
486514
487515
If you want a key to be sent to the terminal, bind it to `vterm--self-insert`,

0 commit comments

Comments
 (0)