From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 791711382C5 for ; Tue, 22 May 2018 19:00:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 950C0E094F; Tue, 22 May 2018 19:00:35 +0000 (UTC) Received: from asav21.altibox.net (asav21.altibox.net [109.247.116.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1B332E0875 for ; Tue, 22 May 2018 19:00:34 +0000 (UTC) Received: from postfix-relay.alstadheim.priv.no (148-252-124.122.3p.ntebredband.no [148.252.124.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: hakon.alstadheim@ntebb.no) by asav21.altibox.net (Postfix) with ESMTPSA id A829A801F0 for ; Tue, 22 May 2018 21:00:32 +0200 (CEST) X-Finnesikke-B-A-I-T: finnesikke@alstadheim.priv.no Received: from smtps.alstadheim.priv.no (localhost [127.0.0.1]) by postfix-relay.alstadheim.priv.no (Postfix) with ESMTP id DD978624E86C for ; Tue, 22 May 2018 21:00:31 +0200 (CEST) Received: from [192.168.2.201] (unknown [192.168.2.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hakon) by smtps.alstadheim.priv.no (Postfix) with ESMTPSA id A359C2560E53 for ; Tue, 22 May 2018 21:00:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alstadheim.priv.no; s=smtp; t=1527015631; bh=OXkG/ORQPvXgB1GLckE7kZWXygwv8JPKhMGjvvv4C4g=; h=Subject:To:References:From:Date:In-Reply-To:From; b=e1vNVbkn4tGEZ0sr8u4gbSKqrO2nUoiN9GkRkany8Rvb9Ygi2P4sDjCcTa5Heoact laegpueuysKmlOW1qd2hrpg3/PBZbDOscJVQhssB+7nej/RtaZie1C4UUv9Llrn9Pw J4SjJCCknk3mK0i9Xfrh47P4fe7XsK9HT1PTzcnc= Subject: Re: [gentoo-user] Re: Console serial terminal/console with command history? To: gentoo-user@lists.gentoo.org References: <20180522173937.qsquv42kojhrdotb@solfire> <5e4afed5-9ca0-78fc-bcf7-c79340c2c955@spamtrap.tnetconsulting.net> <24613266-6eba-7bbb-8607-c1c329f30f7a@spamtrap.tnetconsulting.net> <20180522182823.idiggqfrrgaebts2@matica.foolinux.mooo.com> From: =?UTF-8?Q?H=c3=a5kon_Alstadheim?= Message-ID: <167a8349-19c2-1a00-149e-4fc5f244f88e@alstadheim.priv.no> Date: Tue, 22 May 2018 21:00:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <20180522182823.idiggqfrrgaebts2@matica.foolinux.mooo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=ZI75Z0zb c=1 sm=1 tr=0 a=F9oVK6qnXDsgXOhIrcsnOQ==:117 a=F9oVK6qnXDsgXOhIrcsnOQ==:17 a=IkcTkHD0fZMA:10 a=VUJBJC2UJ8kA:10 a=XvN0LPNquQyaex2FUCEA:9 a=QEXdDO2ut3YA:10 X-Archives-Salt: 2f27f121-a0e1-4e42-8a20-7b10c97e2c21 X-Archives-Hash: 13240aa9aba332a1dead1b081ac671fe Den 22. mai 2018 20:28, skrev Ian Zimmerman: > On 2018-05-22 12:00, Grant Taylor wrote: > >> You might also want to check out using vim or emacs as they have >> terminal emulators built in. They might be able to apply some command >> line history / editing (in a round about way). > Indeed, if there isn't a prepackaged way the next easiest is probably > customizing emacs "comint" mode (which is the base mode behind shell > mode and various other specialized interpreter modes). > Second that, use emacs. Basically you just need to teach emacs to recognize the prompt. Most likely it will already work. There are at least three ways to use emacs for this. The best would be to run emacs on your local machine and then M-x serial-term or M-x shell. ('M' stands for meta, usually means you can push the 'alt' key together with a letter, but there are other ways if you have no alt key, like on a serial connection) . Third way would be to run emacs in text mode on the remote machine. If you have ssh running on the remote machine, check out the "tramp" package in emacs. With no gui, you would need to learn the old tty-commands in emacs, like push followed by 'x' instead of using ALT-x, but it should all be there. Pro-tip: if running emacs on the remote machine, make sure your terminal-connection does not interpret Control-S as a STOP signal, i.e. anything to do with XON/XOFF you do NOT want enabled in your shell-connection.