Gentoo Archives: gentoo-user

From: Grant Taylor <gtaylor@×××××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Console serial terminal/console with command history?
Date: Tue, 22 May 2018 17:54:40
Message-Id: 5e4afed5-9ca0-78fc-bcf7-c79340c2c955@spamtrap.tnetconsulting.net
In Reply to: [gentoo-user] Console serial terminal/console with command history? by tuxic@posteo.de
1 On 05/22/2018 11:39 AM, tuxic@××××××.de wrote:
2 > I am currently exploring Mecrisp-Stellaris FORTH on a STM32F103C8 uC.
3
4 #learningIsFun
5
6 > To communicate with the FORTH-system I use a serlal terminal console
7 > like picocom.
8
9 Okay.
10
11 > Since I am still learning this quirky though fascinating language I
12 > really would appreciate a commandline history.
13
14 Understandable.
15
16 > For that I tried picocom and picocom with rlfe / rlwrap, neocon,
17 > screen, tio.
18
19 I doubt it will make any difference, but you might also try minicom,
20 putty, and cu. You might even be able to get Bash (et al) talk to the
21 serial terminal.
22
23 > None worked and/or has a fixed handling of CR<=>LF, which leads
24 > to an
25 > ugly
26 > output.
27
28 ACK
29
30 > Is there any serial terminal/console (no gui), which has a command
31 > history of some sort and a configurable handling of cr<=>lf?
32
33 I would be somewhat surprised if there was. But only somewhat as there
34 are a lot of different terminal (emulators) that have even more features.
35
36 Remember, that the job of the terminal (emulator) is to display text
37 from the connected device and send input to the connected device. —
38 There's even room for debate about if the terminal (emulator) should
39 display characters that are typed (a.k.a. local echo) or if the remote
40 system should need to send them back for display (non-local / remote echo).
41
42 It sounds like you're wanting to go above and beyond this and have the
43 terminal introduce some intelligence into the mix and add (basic) line
44 editing capabilities and history.
45
46 Such seems like it could be possible to do. But it also seems beyond a
47 basic terminal (emulator) and gets into more of a smart application that
48 you interact with in one way and it interacts with the serial device in
49 another / different way.
50
51 The closest I've come to things like this is using xdotool to send
52 commands from one xterm to another. I could see how you could have a
53 (prefix) command that you run that sends the actual command to another
54 window. That way you could leverage the full history and command line
55 editor of the terminal (emulator) that you're using. Granted, this
56 would be two windows that you would need to use jointly and in close
57 concert with each other.
58
59 There may be other ways to take the output from the remote window and
60 display it locally, thus sort of providing the ability to hide the
61 second / remote window. But I have no idea how to go about this.
62
63 I can see how you might end up with something where you have a big
64 window (132x50) for output and another smaller window (132x10) below it
65 (I'd try to align them) that is used for input. It would be reminiscent
66 of older mainframe / AS/400 terminals where you have one command line
67 and all output comes out above, including a copy of the command entered.
68
69 Anyway....
70
71 I don't know of any examples of what you're asking for. There may be a
72 super fancy terminal (emulator) that will do what you want. ProComm
73 (Plus) and SecureCRT come to mind. But they're GUIs.
74
75 Random thought: I have no idea if Plan9's terminal emulator has any
76 features for this or not. It may be worth looking at. I believe it's
77 been ported to Linux.
78
79 > Thanks for any help in advance -- the FORTH will be with you!
80
81 Good luck.
82
83 Please share if you find anything.
84
85
86
87 --
88 Grant. . . .
89 unix || die

Replies

Subject Author
Re: [gentoo-user] Console serial terminal/console with command history? Grant Taylor <gtaylor@×××××××××××××××××××××.net>