AsyncSSH - Screen Width Issues
AlexLardschneider opened this issue ยท 4 comments
Describe the bug
Hey Carl!
Been switching from using system transport to AsyncSSH, and I am encountering the same issue we already saw in scrapli/scrapli_community#18. Even though I am increasing the screen-width using the CLI command on the device, it seems to be ignored since the output still contains line breaks.
It looks like this can be fixed by setting the term_size
argument during asyncssh session opening (transport.py#221)
self.stdin, self.stdout, _ = await self.session.open_session(
term_type="xterm", term_size=(256, 256), encoding=None
)
Unfortunately, currently there is no way to set this argument except patching the transport.py
file manually.
Maybe we should add the possibility to add user-defined **kwargs
to this open_session
method, like we can for system transport?
Let me know if and how you'd like this implemented (or maybe there is already a way to fix this which I overlooked?), and I can create a PR to solve this.
To Reproduce
See scrapli/scrapli_community#18
Expected behavior
See See scrapli/scrapli_community#18
OS (please complete the following information):
- OS: Linux
- Scrapli Version: 2024.01.30
hey @AlexLardschneider ๐
makes sense! can we support it with the existing transport args like in here? I didnt look too closely yet but I just remember we have at least some capacity to pass arbitrary/semi-arbitrary stuff to asyncssh. if this doesn't work though we can for sure make this work in one way!
Hey @carlmontanari, let me see what I can do.
hey @AlexLardschneider did ya get this sorted ? anything we need to do here?
Hey Carl, things are pretty hectic at the moment, but I haven't forgotten about this.
I'll jump on it when I find some free time!