delete button in console

Polytropon freebsd at edvax.de
Wed Dec 30 05:10:33 UTC 2015


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, ...


More information about the freebsd-questions mailing list