shell-pool / shpool

Think tmux, then aim... lower
Apache License 2.0
1.03k stars 13 forks source link

Preserve environment variables #38

Closed mrzv closed 1 week ago

mrzv commented 1 week ago

What happened Right now, when shpool launches a new shell for the session, it doesn't preserve environment variables. This loses some useful information, for example, whether I'm running via SSH, which I test by checking if $SSH_CLIENT is defined.

What I expected to happen Preserve the environment variables from the shell that launched us.

Version info shpool 0.6.1

ethanpailes commented 1 week ago

Does forward_env do what you want?

If you want to foward all environment variables, there is currently no way to do that, but you can configure a subset.

mrzv commented 1 week ago

That worked for $SSH_CLIENT. Thanks!

ethanpailes commented 1 week ago

You want me to close this or do you think a more general "forward everything" option would be useful?

mrzv commented 1 week ago

You can close it. I don't have a strong opinion on the general "forward everything". At least, not yet.

ethanpailes commented 1 week ago

Sounds good, we'll KISS for now then