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

Feature request: 命令行参数取代文件选择框 #126

Open
towith opened this issue Jul 11, 2024 · 4 comments
Open

Feature request: 命令行参数取代文件选择框 #126

towith opened this issue Jul 11, 2024 · 4 comments

Comments

@towith
Copy link

towith commented Jul 11, 2024

Feature request: 命令行参数取代文件选择框
直接指定宿主机文件路径, 而不用弹出文件对话框选择
优点: 利于批量自动化
例如powershell
@("host1","host2") | foreach {tssh $_ "pwd;trz --localpath d:/somefile.sh"}

@lonnywong
Copy link
Member

可以用 scp 来自动化吧?

@towith
Copy link
Author

towith commented Jul 11, 2024

scp好像不支持密码的交互, 要实现的话也不是不行, 就比较麻烦比如expect, autohotkey,配置密钥免密ssh, ansible等之类的, 作为一个命令行工具, 我个人觉得trzsz可以支持0交互更赞 👍

@lonnywong
Copy link
Member

按 trzsz 现在的架构不太好实现,trz 运行之后会输出 ::TRZSZ:TRANSFER:R:1.1.7:2068932306000:45249 这样的字符串,然后就开始选文件了,这时 trz 与客户端还没有交互数据,指定的 --localpath 也就没办法提前传给客户端,不好改。

或许,可以基于 tssh 的代码,实现一个 tscp 出来。

@towith
Copy link
Author

towith commented Jul 12, 2024

哦, 原来是这样
"可以基于 tssh 的代码,实现一个 tscp 出来" 那也不错
好的, 无论可不可以, 都谢谢你们提供的好用的终端工具 👍

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