Date: Fri, 26 Sep 2014 03:58:51 +0200 From: Polytropon <freebsd@edvax.de> To: Dave Babb <dcbdbis@comcast.net> Cc: User Questions <freebsd-questions@freebsd.org> Subject: Re: TCSH issue Message-ID: <20140926035851.301e3cc6.freebsd@edvax.de> In-Reply-To: <54243DA2.1070805@comcast.net> References: <54243DA2.1070805@comcast.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140926035851.301e3cc6.freebsd>