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

sh / bash / zsh? #457

Open
benzkji opened this issue Jul 5, 2023 · 7 comments · May be fixed by #548
Open

sh / bash / zsh? #457

benzkji opened this issue Jul 5, 2023 · 7 comments · May be fixed by #548

Comments

@benzkji
Copy link

benzkji commented Jul 5, 2023

I just started using lazydocker, and really like the E shortcut.

As far as I can tell, this executes /bin/sh. A keypress of the arrow up then produces a ^[[A (on my system: ubuntu, german/swiss keyboard layout) . I don't know enough about shells to tell where this is coming from exactly...but, executing /bin/bash as first command resolves the arrow up problem. I guess that not all containers provide bash, so sh is the sane default?

Point: I was looking for a configuration option, to tell lazydocker whicht shell to use when pressing E. I know I could achieve the same with custom commands, but it would be a keypress more, every time ;-) Also, I might be missing something in the docs...?

@benzkji benzkji changed the title bash / shell / zsh? sh / bash / zsh? Jul 5, 2023
@mark2185
Copy link
Contributor

mark2185 commented Jul 5, 2023

Currently it's hardcoded as /bin/sh, so your only choice is a custom command, or compiling lazydocker from source :)

@benzkji
Copy link
Author

benzkji commented Jul 5, 2023

but it would be no big deal making it configurable, no? Will think about a PR :-)

@peauc
Copy link

peauc commented Jun 8, 2024

Ideally we would have a list of preferred shell which will be used by lazydocker to try one by one the available shells

@peauc
Copy link

peauc commented Jun 15, 2024

The current code is not hardcoded on sh but to the login shell of the container's* user we are attaching to.
In many case it will be sh, but can be ash, tcsh & bash depending of the linux flavor.

@benzkji
Copy link
Author

benzkji commented Jun 20, 2024

@peauc my login shell is zsh? I may be wrong, though. But if I ctrl-alt-F3 in my ubuntu, and login there, it's zsh, as echo $0 says -zsh, so that's my login shell no? It's also in /etc/passwd... glad for any pointers.

@peauc
Copy link

peauc commented Jun 20, 2024

@benzkji I spoke whithout clarity.
I meant that lazydocker looks at the login shell of the user inside the container you are attaching to.

@benzkji
Copy link
Author

benzkji commented Jun 20, 2024

aarrrff, totally makes sense. thanks!

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