This collection of configuration files can be used to improve the interactive experience of TCSH users under FreeBSD, Max OS X or Linux. Its most important features are:
- Useful key bindings, including a call to
man(1)
uponF1
. - Customised clean and lean prompt.
- Completion patterns for some FreeBSD commands.
- Support for development with git.
- Support for several terminal types.
The installation procedures uses BSD Owl.
It will overwrite the system scripts csh.login
, csh.logout
and
csh.cshrc
.
To install these scripts, download the latest tarball, explode it and
issue a make install
in the toplevel directory.
Supported terminal types
We support the terminal types xterm
, cons25
, and linux
. Under
X11 or Quartz, graphical terminal advertises themselves as xterm
.
The types cons25
and xterm
are made for virtual consoles under
FreeBSD and Linux-based operating systems.
Please note that graphical environments can intercept some of these keystrokes and interpret them differently.
These key bindings are borrowed from the tcshrc project.
INSERT
: toggles overwrite or insert modeDELETE
: delete char at cursor positionHOME
: go to the beginning of the lineEND
: go to the end of the linePAGE UP
: search in history backwards for line beginning as currentPAGE DOWN
: search in history forwards for line beginning as currentESC-left-arrow
: go to beginning of left wordESC-right-arrow
: go to beginning of right wordF1
: help on command currently typedF2
: set the mark command to cursor positionF3
: move cursor to the marked positionF4
: unboundF5
: check line for spelling and make changesF6
: check current word for spelling and make changesF7
: do a ala-csh completionF8
: insert last item of previous commandF9
: unboundF10
: do an 'ls -l'F11
: display load average and current process statusF12
: clear-screenCtrl-X p
: Edit path (thanks to Carlos Duarte<cgd@teleweb.pt>
)Ctrl-X *
: Expand globCtrl-X $
: Expand variables
Command-line completion patterns are provided to support the use of the following commands:
- Shell internals
cd
,alias
,set
rm
, which ignores usual precious filesman
make
, which understands typical words such asinstall
ordistclean
dd
which understands the-if=
and-of=
syntaxgrowisofs
which understands the-M=
and-Z=
syntaxtex
,latex
,mf
andmpost
understand their most common options such as-output-directory
or-jobname
xdvi
,evince
,gv
,xpdf
andacroread
select files they can rendersvn
is aware of its subcommandsgit
is aware of its subcommands and branch names- FreeBSD commands
mount
,atacontrol
andcdcontrol
are handled
We use a simple prompt displaying the command line number, the hostname and the last part of the current working directory, as in:
[123] (pointyhat) ports >
Within a git repository, the current branch is displayed, as in
[123] (pointyhat) ports/master >
Note that the branch name is rendered with a lighter color.
Files under /etc/csh/login.d
, /etc/csh/rc.d
and
/etc/csh/logout.d
are sourced by the shell at the corresponding
occasions. This provides system administrators with an easy way to
add additional features during login, initialisation and logout
phases.
Michael Grünewald in Bonn, on April 25, 2014