Open jooy2 opened 1 year ago
Well zmodem is tricky, as it actually competes with VT sequences on protocol level. Terminal emulators (TE) supporting it have to stop their terminal magic and spin up a zmodem parser. So technically not the VT TE supports zmodem, but some sort of a preparser doing the zmodem vs VT parser belly dance. And thats nothing to get done right easily, as zmodem relies on a magic introducer, which is also perfectly valid in terminal data, so you might end up with ambiguity (you gonna need some read ahead logic to decide, whether it is real zmodem data). Kinda every terminal with zmodem support suffer from this, and correct recovery from zmodem ambiguity is rather hard to impossible for some edge cases (yes you can render a terminal with zmodem support unusable by "carefully crafting" the data). This needed complexity outside of the real terminal logic made us stop supporting the old zmodem addon.
A much better way to get file transfers rolling is to shape things into its own dedicated terminal sequence without any ambiguity at the higher protocol level. There are some attempts into that direction, but none took broader adoption yet, an so has xterm.js nothing in this regard yet either.
Thanks for the detailed explanation. I just wanted to check what the status was on the implementation of this feature.
Hopefully the technical difficulties will be resolved in the near future and Zmodem will be implemented.
Well, feel free to contribute a solution. But as I wrote above, the "technical difficulties" cannot be fully resolved, as it is an inherent issue of a protocol clash.
maybe trzszjs better
I never bothered to look into how zmodem works, I wasn't comfortable maintaining the old addon as I didn't use or understand it. Feels out of scope to me still.
Thanks for sharing information.
I recently found something like this: (Just thought I'd share it for reference.)
The following Xterm written in Dart seems to support Zmodem. I don't know what the structure of this is, but it might be a helpful reference for someone.
https://github.com/TerminalStudio/xterm.dart https://github.com/TerminalStudio/zmodem
Thanks to the developers for creating an amazing terminal module and supporting it to this day.
It would be nice to have separate support for the
Zmodem
add-on to receive or send files to the terminal usinglrzsz
.Zmodem
is still one of the solutions for file transfer supported by many terminal emulators.I realize that there are already old closed issues about this. (#279) However, as explained in (#1128 (comment)), the
Zmodem
add-on has now been removed, so I felt the need to reopen these issues.Similarly, I found the following third-party solution (
ZmodemJS
), but it doesn't seem to be maintained since 2020. https://github.com/FGasper/zmodemjsAre there currently any other solutions for supporting
Zmodem
that I'm not aware of? If not, it would be awesome if Xterm.js supportedZmodem
via an add-on.Regards,