Skip to content

Improve documentation for server.shell() operation #1275

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

Open
asmaier opened this issue Jan 19, 2025 · 1 comment
Open

Improve documentation for server.shell() operation #1275

asmaier opened this issue Jan 19, 2025 · 1 comment

Comments

@asmaier
Copy link

asmaier commented Jan 19, 2025

Is your feature request related to a problem? Please describe

The documentation at

https://docs.pyinfra.com/en/3.x/operations/server.html#operations-server-shell

is lacking important information.

Describe the solution you'd like

It would already help if the page above would link to https://docs.pyinfra.com/en/3.x/arguments.html#shell-control-features . Then at least it would be clear that the default shell is sh with all its shortcomings.
Another issue I had was that even setting a _shell_executable="zsh" will not give you your "normal" shell environment. It will lack all the usual environment variables. If I need them for my scripts, I have to ask for a login shell by setting _shell_executable="zsh -l" or _shell_executable="bash -l". The documentation should mention that.

And last but not least the documentation should clarify what the difference of server.shell() is to https://docs.pyinfra.com/en/3.x/operations/ssh.html#ssh-command . When would I use one over the other? I believe for beginners that is quite unclear.

@ascorbic-acid
Copy link

thanks and how to set bash globally for all local/server shell commands ?

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

No branches or pull requests

2 participants