[Toybox] [PATCH] microcom: simple menu, new "paste file" functionality.
Rob Landley
rob at landley.net
Sat Oct 28 00:33:27 PDT 2023
On 10/25/23 19:48, enh via Toybox wrote:
> Rather than take up yet another key for the new functionality, I've moved
> everything to a menu, similar to the one in telnet. It's not amazing,
> but it's the least code I could get away with, and it's good enough for
> now, and it leaves us in a better place if we need to add more stuff
> (such as xmodem, say).
>
> But this is enough to let me stop using minicom and get back to toybox
> microcom for today!
What I always did was "toybox uuencode target_filename < local_file | xclip
-selection clipboard" and then run uudecode at the far end and right
click->paste it into the relevant xterm window. I hadn't noticed a size limit...
There was discussion of a CTRL() macro in context of vi, but I don't see where
it was applied to toys.h or lib/lib.h? Ah, it's in glibc's sys/ttydefaults.h
which is included from termios.h... but not in the NDK build, or in the musl
build. It _only_ leaks in the glibc build.
The macro's actually a bit non-obvious to me because CTRL(A) and CTRL(a) seem
like they should produce different results? Ah, and they want CTRL('A'). What
was wrong with 'A'-64 again?
You want "p) paste file" instead of "f) send file"? (Paste-but-not-clipboard has
more mnemonic weight than File?)
The read(1) loop is similar to the loop in lib/passwd.c:read_password() and I
should probably factor it out. You only accept DELETE not BACKSPACE to shorten
the input line?
You have a progress indicator instead of letting the other end do that. (How big
are the files you're sending?)
Rob
More information about the Toybox
mailing list