Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a fallback shell command #638

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lrittel
Copy link

@lrittel lrittel commented Oct 29, 2022

This commit introduces a new defcustom that configures a fallback shell executable which is used if the selected shell (e.g. vterm-shell) is not executable.

The fallback is especially useful if the vterm is opened on a remote host over ssh/tramp which does not have the configured vterm-shell installed, but the user does not want to configure a different shell for all ssh hosts, as some may have the shell in vterm-shell installed.

This is my suggestion in response to running into #567.
I have only tested my solution on my local machine (by configuring vterm-shell to something invalid).

This change introduces breaking behavior as adding command line arguments to vterm-shell would have worked previously. If this is something that should be supported by vterm, my suggestion would be to add support for arguments by allowing the user to configure vterm-shell to a list or to introduce an additional defcustom.

Edit: I added /bin/bash as a default as it should be available pretty much everywhere. But /bin/sh might be a better choice.

This commit introduces a new `defcustom` that configures a fallback
shell executable which is used if the selected shell
(e.g. `vterm-shell`) is not executable.

The fallback is especially useful if the `vterm` is opened on a remote
host over ssh/tramp which does not have the configured `vterm-shell`
installed, but the user does not want to configure a different shell for
all ssh hosts, as some may have the shell in `vterm-shell` installed.
@lexa
Copy link

lexa commented Jan 17, 2023

What if instead of a customized fallback shell you could use the same shell as used by TRAMP. If tramp works on the remote, then you could be sure that the shell is also working. Geting the TRAMP shell is just a one-liner:

            (with-connection-local-variables shell-file-name)

see:
fcc4ec5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants