From owner-freebsd-questions@FreeBSD.ORG Fri Sep 26 02:06:54 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 6D3F8EBB for ; Fri, 26 Sep 2014 02:06:54 +0000 (UTC) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D43CB699 for ; Fri, 26 Sep 2014 02:06:53 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id pv20so4037981lab.24 for ; Thu, 25 Sep 2014 19:06:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=+VyTdGxWhovjAvuWvnhZH4Ea5C+hR2zq/CCmlnoBiC8=; b=luP3bqnPpG9aqg7mIQa9KZWtdiCHWPZC11GGMtdwLnM5T4tfUbuvDscjL8KWT7tKB4 K1ZijVbK9Ye4MbTxg1/vOS5ZF0H2iFwEM7HgG+Z6nTfvtVwOjrggrqh1lgozR5dzEYlu lX+ungebu2oI0bJix0fmWVVPMnCIM/w5sx3+ZxI4A48J/MeTHIzHo4oruXav/BwPuf9T QbCcgJ4bYeU2MJFaRw1NP4fXzdolY25qh1XZ5WhHDYrQb7QOcCQx82ZYB/MHnywcRBUa IEOarqK8eM6wWf+1ognDfYYDEPHGeV52BrZ19blSPb6AYunV6vPl0yTUngZp88At8+xC h9KQ== X-Gm-Message-State: ALoCoQn8ae4JXBIoG7DG+eIHXmYpE9DzBhpgy3UuDJThZMKZjOrttPpvpRxrmiZHRuu+LtjdGwX7 MIME-Version: 1.0 X-Received: by 10.112.150.194 with SMTP id uk2mr10259lbb.97.1411697211169; Thu, 25 Sep 2014 19:06:51 -0700 (PDT) Received: by 10.25.20.159 with HTTP; Thu, 25 Sep 2014 19:06:50 -0700 (PDT) X-Originating-IP: [70.209.207.5] Received: by 10.25.20.159 with HTTP; Thu, 25 Sep 2014 19:06:50 -0700 (PDT) In-Reply-To: <20140926035851.301e3cc6.freebsd@edvax.de> References: <54243DA2.1070805@comcast.net> <20140926035851.301e3cc6.freebsd@edvax.de> Date: Thu, 25 Sep 2014 19:06:50 -0700 Message-ID: Subject: Re: TCSH issue From: "Brian W." To: Polytropon Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD Mailing List , Dave Babb 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 02:06:54 -0000 If I remember correctly I used to use stty erase ^H for that. Brian On Sep 25, 2014 6:59 PM, "Polytropon" wrote: > 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, ... > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" >