CSH is the default shell for root user on FreeBSD system. Basic usage is pretty much the same as any other shell like
fish or whatever. Until you try to execute some bash specific for loops, or attempt to use
Delete key. Whaaaat? - Yes, apparently delete doesn’t give the correct character in
csh and just prints
~. I don’t know if that’s
xterm (or xterm compatible) terminal thing or just a csh thing but it doesn’t matter.
Here’s how to solve it:
~/.cshrcin your favorite text editor
Within your prompt section (
if ($?prompt) then) add following block (or fill in the needed
bindkeyif you already have that section):
if ( $?tcsh ) then bindkey "\e[3~" delete-char endif
Save the file and run: source ~/.cshrc
Voila, it should work!