Skip to content
Ethan Pailes edited this page Dec 22, 2025 · 6 revisions

shpool attach hangs when trying to launch a new shell

Make sure that your default shell arrives at a normal shell prompt when launched. In order to set up a prompt prefix, shpool expects that your shell will behave as an interactive shell when it first launches. If you have something in your startup .rc file that pauses setup for some sort of non-shell interaction, this expectation is violated. Examples might include having a sudo command in your .bashrc or having a read loop that asks you to choose between one of several workspaces to focus on.

To work around this issue why retaining an interactive startup script, set prompt_prefix = "" in your config (note that this will not work before #66).

neovim does not resize properly after reattach

Certain terminals support in-band resize events, and when neovim detects that such a terminal is attached, it will switch from listening for SIGWINCH events, which shpool generates to indicate size change to only paying attention to these in-band resizes. shpool does not know how to generate in-band resizes, so neovim will not know that it needs to redraw when the terminal reattaches with a new size.

As a workaround, you can run

:lua io.stdout:write('\027[?2048h')

from within neovim after the reattach.

See #240 for updates on the status of this issue.

Initial PATH value differs from normal

To set up your initial PATH, by default shpool will use /usr/bin:/bin:/usr/sbin:/sbin, the same initial path that a stock sshd uses. You can change the default PATH value via the initial_path config var in your ~/.config/shpool/config.toml. Commonly though, this value will get overridden before you shell even starts by the /etc/environment file, which shpool will parse and use to seed the initial environment. Finally, you can inherit the PATH from your local shell at the time you first shpool attach to a session by including PATH in your forward_env list in your config.

The most likely reason that your might observe a different initial PATH value from the one you see in your usual shells, is that your distro's sshd binary was compiled with a different default PATH value than /usr/bin:/bin:/usr/sbin:/sbin and none of the mechanisms described above are kicking in to override that default. Since this non-default path value was set in your sshd by the packager, the right place to fix the issue is in the packaging of shpool. If you are using a package you got from your distro to install shpool, consider asking the maintainer of that package to inject an /etc/shpool/config.toml file with the appropriate default path set into their package. If you have installed shpool some other way, just use the initial_path config var in your shpool config to work around the issue.

See #276 for additional context.

prompt prefix does not appear in nu shell

Shpool does not support injecting prompts into nu shell. Prior to #272 being merged and released, this manifests as shpool hanging while trying to spawn a nu shell. After that fix, shpool will work with nu, but will not inject a prompt prefix even if you configure one. Either way, shpool will work with nu when prompt_prefix = "".