Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Dec 2015 06:10:29 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Sergei G <sergeig.public@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: delete button in console
Message-ID:  <20151230061029.ff1eb4dd.freebsd@edvax.de>
In-Reply-To: <CAFLLzCMdGnQXMFBo1wJexg1x7wJOnrL4bCK%2Bg10surB_aV-e1Q@mail.gmail.com>
References:  <56825701.30908@gmail.com> <20151229180750.187ed7c9.freebsd@edvax.de> <5682F182.7080603@hiwaay.net> <20151229222622.GA18290@becker.bs.l> <CAFLLzCMdGnQXMFBo1wJexg1x7wJOnrL4bCK%2Bg10surB_aV-e1Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 29 Dec 2015 15:16:50 -0800, Sergei G wrote:
> Thanks all
> 
> I have added bindkey "\e[3~" delete-char to my ~/.cshrc file and Delete,
> Home and End buttons work now.
> 
> The file content is very close to the default, so I am providing portion of
> .cshrc for your reference:
> 
> if ( $?tcsh ) then
>    #
> http://stackoverflow.com/questions/1912328/how-to-map-delete-and-end-keys-on-tcsh-shell
>    # Delete
>    bindkey "\e[3~" delete-char
>    # Home
>    bindkey "\e[1~" beginning-of-line
>    # End
>    bindkey "\e[4~" end-of-line
>    bindkey "^W" backward-delete-word
>    bindkey -k up history-search-backward
>    bindkey -k down history-search-forward
> endif

Yes, I have almost the same - and for longer than 6 years when the
Stack Overflow article originates from, even though the notation of
the Esc character is a little different (but valid). :-)

Oh, by the way: Let me add a suggestion for ~/.inputrc which might
be useful for programs which use the readline mechanism:

	"\e[A": history-search-backward
	"\e[B": history-search-forward
	"\e[C": forward-char
	"\e[D": backward-char
	set show-all-if-ambiguous on
	set completion-ignore-case off

See "man 3 readline" for details.




-- 
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?20151230061029.ff1eb4dd.freebsd>