SSH.NET icon indicating copy to clipboard operation
SSH.NET copied to clipboard

How can I modify the cols rows in CreateShellStream according to the size of the front-end terminal?

Open zengnanhua opened this issue 1 year ago • 8 comments

How can I modify the cols rows in CreateShellStream according to the size of the front-end terminal?

zengnanhua avatar Nov 27 '23 02:11 zengnanhua

Your question is out of SSH.NET's scope.

scott-xu avatar Nov 27 '23 13:11 scott-xu

@zengnanhua By "front-end terminal", are you referring to the console instance of your app? Or otherwise could you clarify?

@scott-xu Please consider providing a more informative explanation when closing issues.

Rob-Hague avatar Nov 27 '23 13:11 Rob-Hague

@zengnanhua 如果前台的长度和宽度是绝对值,那么可以根据字体大小自行计算最多可以容纳多少行/列的字符。

scott-xu avatar Nov 27 '23 14:11 scott-xu

@scott-xu 怎么动态变化 CreateShellStream创建完 就不能更改了

zengnanhua avatar Dec 06 '23 07:12 zengnanhua

目前是不能修改的。建议关闭后重新创建。 @zengnanhua

scott-xu avatar Dec 06 '23 07:12 scott-xu

重新创建 环境就不一样了 比如到cd 到了某个文件夹 ,请问一下有没有其他方式

zengnanhua avatar Dec 06 '23 11:12 zengnanhua

python 这个包(paramiko)有 worker.chan.resize_pty(*resize) 这样的一个方法 ,,不知道他怎么实现的

zengnanhua avatar Dec 07 '23 01:12 zengnanhua

Duplicate with issue https://github.com/sshnet/SSH.NET/issues/1061 (PR https://github.com/sshnet/SSH.NET/pull/1062) User wants to change window dimensions after shell creation. Sorry I shouldn't close this issue. Would you mind help reopen it? @WojciechNagorski @drieseng

scott-xu avatar Dec 07 '23 16:12 scott-xu