1 |
Den 22. mai 2018 20:28, skrev Ian Zimmerman: |
2 |
> On 2018-05-22 12:00, Grant Taylor wrote: |
3 |
> |
4 |
>> You might also want to check out using vim or emacs as they have |
5 |
>> terminal emulators built in. They might be able to apply some command |
6 |
>> line history / editing (in a round about way). |
7 |
> Indeed, if there isn't a prepackaged way the next easiest is probably |
8 |
> customizing emacs "comint" mode (which is the base mode behind shell |
9 |
> mode and various other specialized interpreter modes). |
10 |
> |
11 |
Second that, use emacs. Basically you just need to teach emacs to |
12 |
recognize the prompt. Most likely it will already work. |
13 |
|
14 |
There are at least three ways to use emacs for this. The best would be |
15 |
to run emacs on your local machine and then M-x serial-term or M-x |
16 |
shell. ('M' stands for meta, usually means you can push the 'alt' key |
17 |
together with a letter, but there are other ways if you have no alt key, |
18 |
like on a serial connection) . Third way would be to run emacs in text |
19 |
mode on the remote machine. If you have ssh running on the remote |
20 |
machine, check out the "tramp" package in emacs. |
21 |
|
22 |
With no gui, you would need to learn the old tty-commands in emacs, like |
23 |
push <esc> followed by 'x' instead of using ALT-x, but it should all be |
24 |
there. |
25 |
|
26 |
Pro-tip: if running emacs on the remote machine, make sure your |
27 |
terminal-connection does not interpret Control-S as a STOP signal, i.e. |
28 |
anything to do with XON/XOFF you do NOT want enabled in your |
29 |
shell-connection. |