From owner-freebsd-questions@freebsd.org Wed Oct 19 16:30:35 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47293C186AB for ; Wed, 19 Oct 2016 16:30:35 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E5017D9 for ; Wed, 19 Oct 2016 16:30:34 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-117-205.dynamic.qsc.de [92.195.117.205]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 051A827809; Wed, 19 Oct 2016 18:30:25 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u9JGUPWO002165; Wed, 19 Oct 2016 18:30:25 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 19 Oct 2016 18:30:25 +0200 From: Polytropon To: David Guyot Cc: freebsd-questions@freebsd.org Subject: Re: fish: arrows and backspace keys no longer supported after =?ISO-8859-1?Q?11.0-RELEASE=A0upgrade?= Message-Id: <20161019183025.ad55425f.freebsd@edvax.de> In-Reply-To: <1476877902.1196.27.camel@europecamions-interactive.com> References: <1476877902.1196.27.camel@europecamions-interactive.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 16:30:35 -0000 On Wed, 19 Oct 2016 13:51:42 +0200, David Guyot wrote: > Hello, there. > > I was using a 10.3-RELEASE FreeBSD with the packaged fish 2.2.0 > installed, without customization, and upgraded my system and packages > to 11.0-RELEASE. fish were upgraded to 2.3.1, and I lost the previous > default prompt, but that doesn't really matter. My main problem is that > it lost support of arrows and backspace keys: whenever I try to use > them, I get this: > # Up arrow for autocompletion with the last command > penegal@Aethelthryth-FreeBSD~/usr/home/penegal> [A > # Right arrow for autocompletion with the last similar command, then > # left arrow to correct input > penegal@Aethelthryth-FreeBSD~/usr/home/penegal> ls[C[D What you see there is the escape code sequence of those keys, without the actual escape happening. The code ^[[A (read: ^[ = escape, [ = left bracket, A) is the cursor up key; ^[[C and ^[[D are right and left respectively. There has been a regression recently regarding sh not interpreting escape characters anymore, caused by libedit: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211360 It could be possible that you're seeing something related to the same origin. > Tab still functions as usual; The tab key sends the ASCII code 9, no escape code. > backspace produces no result, so I have > to Ctrl+C to erase the line and restart the typing from the start. Backspace usually sends ASCII code 8, often abbreviated as ^H (Ctrl-H). What does $ stty -a show for those control character? > As I > also use fish as the root shell, the problem persists when using sudo > su, but not with su -; Both "sudo" and "su" (and therefore "sudo su" do not simulate a full login, while "su -" does that. > the problem is also present when using fish from > vt, and the su tweak works all the same. That's to be expected, because (if I remember correctly) the text mode consoles now also use the "xterm" emulation. > bash doesn't have this problem > and responds as usual to these keys, as do fish over SSH connections, > so it's not keyboard-related. I think bash uses ncurses / readline for input processing... > I suspect a configuration that broke upon the upgrade, but am unsure > about it, and the fish changelog doen't seem to have anything related, > but I'm not accustomed to its internals and can have missed it. Does > somebody have suggestions? Read the bug report mentioned above. Does this sound reasonable? Maybe you should also file a bug report or add something to the existing one. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...