From owner-freebsd-questions@FreeBSD.ORG Fri Sep 26 01:59:02 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CEACD7B for ; Fri, 26 Sep 2014 01:59:02 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.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 CCD3B371 for ; Fri, 26 Sep 2014 01:59:01 +0000 (UTC) Received: from r56.edvax.de (port-92-195-78-194.dynamic.qsc.de [92.195.78.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 6EB2B3CDB8; Fri, 26 Sep 2014 03:58:52 +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 s8Q1wp9T002071; Fri, 26 Sep 2014 03:58:51 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 26 Sep 2014 03:58:51 +0200 From: Polytropon To: Dave Babb Subject: Re: TCSH issue Message-Id: <20140926035851.301e3cc6.freebsd@edvax.de> In-Reply-To: <54243DA2.1070805@comcast.net> References: <54243DA2.1070805@comcast.net> 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 Cc: User Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2014 01:59:02 -0000 On Thu, 25 Sep 2014 10:06:58 -0600, Dave Babb wrote: > Upon a recommendation of a fellow and very experienced FreeBSD user...I > have switched from bash to tcsh as my user shell. I have not and will > not change the root's shell from sh. The dialog shell for root is also the C shell; sh is the system's standard scripting shell, as well as the suggestion for the maintenance shell in single user mode. > Let me explain: If I fat finger something into the cli....lets say > "freeecolor -om"....If I was to place my cursor on the last "e" and > backspace...everythings fine...However if I put my cursor on that same > letter and press the delete key...it doesn't delete the letter, rather > it inserts a tilde "~". "sh" behaves the same way on my system. What you're experiencing here is a "problem" with the setting of the terminal emulator (what codes are generated by keys) and the shell (how shell actions are defined in keyboard control sequences). The shell prints the "code" for the key when it doesn't know what to do with it. > Does anyone know how I can correct this behavior? I have the following addition in /etc/csh.cshrc so all user shells inherit the setting: if ($?prompt) then # ... stuff omitted ... if ( $?tcsh ) then bindkey "^W" backward-delete-word bindkey -k up history-search-backward bindkey -k down history-search-forward endif bindkey ^? delete-char # for console bindkey ^[[3~ delete-char # for xterm endif The last two "bindkey" lines should make sure the delete key does what you rightfully expect it to do. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...