CSH is the default shell for root user on FreeBSD system. Basic usage is pretty much the same as any other shell like bash
, zsh
, 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:
-
Open up
~/.cshrc
in your favorite text editor -
Within your prompt section (
if ($?prompt) then
) add following block (or fill in the neededbindkey
if 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!