tcsh («tee-see-shell») is a Unix shell based on and compatible with the C shell (csh). It is essentially the C shell with programmable command-line completion, command-line editing, and a few other features. It is the native root shell for BSD-based systems such as FreeBSD.
Almost all Linux distros and BSD today use tcsh instead of the original csh. In most cases csh is a symbolic link that points to tcsh. This is because tcsh is backward compatible with csh, and the last is not maintained anymore.
- TCSH Home
- TCSH Wikipedia
- TCSH manual page
- “An Introduction to the C shell”, William Joy
- TCSH Bug reports and/or features requests
Some more files: tcsh help command (for 132x35 terminal size), my ~/.tcshrc
1#!/bin/tcsh
2# The first line of the script is a shebang which tells the system how to execute
3# the script: http://en.wikipedia.org/wiki/Shebang_(Unix)
4# TCSH emulates the shebang on systems that don't understand it.
5
6# In most cases you'll use `#!/bin/tcsh -f`, because `-f` option does not load
7# any resource or start-up files, or perform any command hashing, and thus
8# starts faster.
9
10# --- the echo command --------------------------------------------------------
11# The `echo` writes each word to the shell's standard output, separated by
12# spaces and terminated with a newline. The echo_style shell variable may be
13# set to emulate (or not) the flags and escape sequences.
14
15# Display the value of echo_style
16echo $echo_style
17
18# Enable `echo` to support backslashed characters and `-n` option (no new line)
19# This is the default for tcsh, but your distro may change it. Slackware has
20# done so.
21set echo_style = both
22
23# Prints "Hello world"
24echo Hello world
25echo "Hello world"
26echo 'Hello world'
27echo `echo Hello world`
28
29# This prints "twonlines" in one line
30echo two\nlines
31
32# Prints the two lines
33echo "two\nlines"
34echo 'two\nlines'
35
36# --- Basic Syntax ------------------------------------------------------------
37
38# A special character (including a blank or tab) may be prevented from having
39# its special meaning by preceding it with a backslash `\`.
40# This will display the last history commands
41echo !!
42# This will not
43echo \!\!
44
45# Single quotes prevent expanding special characters too, but some
46# characters like `!` and backslash have higher priority
47# `$` (variable value) will not expand
48echo '$1 tip'
49# `!` (history) will expand
50echo '!!'
51
52# Strings enclosed by back-quotes will be executed and replaced by the result.
53echo `ls`
54
55# Semi-colon separate commands
56echo 'first line'; echo 'second line'
57
58# There is also conditional execution
59echo "Always executed" || echo "Only executed if the first command fails"
60echo "Always executed" && echo "Only executed if the first command does NOT fail"
61
62# Parenthesised commands are always executed in a subshell,
63
64# example: creates a project and then informs you that it finished while
65# it does the installation.
66make && ( espeak "BOSS, compilation finished"; make install )
67
68# prints the home directory but leaves you where you were
69(cd; pwd); pwd
70
71# Read tcsh man-page documentation
72man tcsh
73
74# --- Variables ---------------------------------------------------------------
75# The shell maintains a list of variables, each of which has as value a list of
76# zero or more words. The values of shell variables can be displayed and
77# changed with the `set` and `unset` commands.
78# The system maintains its own list of "environment" variables.
79# These can be displayed and changed with `printenv`, `setenv`, and `unsetenv`.
80# The syntax of `setenv` is similar to POSIX sh.
81
82# Assign a value or nothing will create a variable
83# Assign nothing
84set var
85# Assign a numeric value
86# the '@' denotes the expression is arithmetic; it works similar to 'set' but
87# the right value can be a numeric expression.
88@ var = 1 + 2
89# Assign a string value
90set var = "Hello, I am the contents of 'var' variable"
91# Assign the output of a program
92set var = `ls`
93
94# Remove a variable
95unset var
96# Prints 1 (true) if the variable `var` exists otherwise prints 0 (false)
97echo $?var
98# Print all variables and their values
99set
100
101# Prints the contents of 'var'
102echo $var;
103echo "$var";
104# Prints the string `$var`
105echo \$var
106echo '$var'
107# Braces can be used to separate variables from the rest when it is needed
108set num = 12; echo "There ${num}th element"
109
110# Prints the number of characters of the value: 6
111set var = '123456'; echo $%var
112
113### LISTs
114# Assign a list of values
115set var = ( one two three four five )
116# Print all the elements: one two three four five
117echo $var
118echo $var[*]
119# Print the count of elements: 5
120echo $#var
121# Print the indexed element; This prints the second element: two
122echo $var[2]
123# Print range of elements; prints 2nd up to 3rd: two, three
124echo $var[2-3]
125# Prints all elements starting from the 3rd: three four five
126echo $var[3-]
127# Prints print all up to 3rd element: one two three
128echo $var[-3]
129
130### Special Variables
131# $argv list of command-line arguments
132# $argv[0] this file-name (the file of the script file)
133# $# $0, $n, $* are the same as $#argv, $argv[0], $argv[n], $argv[*]
134# $status, $? the exit code of the last command that executed
135# $_ the previous command line
136# $! the PID of the last background process started by this shell
137# $$ script's PID
138
139# $path, $PATH the list of directories that will search for an executable to run
140# $home, $HOME user's home directory, also the `~` can be used instead
141# $uid user's login ID
142# $user user's login name
143# $gid the user's group ID
144# $group the user's group-name
145# $cwd, $PWD the Current/Print Working Directory
146# $owd the previous working directory
147# $tcsh tcsh version
148# $tty the current tty; ttyN for Linux console, pts/N for terminal
149# emulators under X
150# $term the terminal type
151# $verbose if set, causes the words of each command to be printed.
152# can be set by the `-v` command line option too.
153# $loginsh if set, it is a login shell
154
155# TIP: $?0 is always false in interactive shells
156# TIP: $?prompt is always false in non-interactive shells
157# TIP: if `$?tcsh` is unset; you run the original `csh` or something else;
158# try `echo $shell`
159# TIP: `$verbose` is useful for debugging scripts
160# NOTE: `$PWD` and `$PATH` are synchronised with `$cwd` and `$pwd` automatically.
161
162# --- Variable modifiers ------------------------------------------------------
163# Syntax: ${var}:m[:mN]
164# Where <m> is:
165# h : the directory t : the filename r : remove extension e : the extension
166# u : uppercase the first lowercase letter
167# l : lowercase the first uppercase letter
168# p : print but do not execute it (hist)
169# q : quote the substituted words, preventing further substitutions
170# x : like q, but break into words at white spaces
171# g : apply the following modifier once to each word
172# a : apply the following modifier as many times as possible to single word
173# s/l/r/ : search for `l` and replace with `r`, not regex; the `&` in the `r` is
174# replaced by `l`
175# & : Repeat the previous substitution
176
177# start with this file
178set f = ~/Documents/Alpha/beta.txt
179# prints ~/Documents/Alpha/beta
180echo $f:r
181# prints ~/Documents/Alpha
182echo $f:h
183# prints beta.txt
184echo $f:t
185# prints txt
186echo $f:e
187# prints beta
188echo $f:t:r
189# prints Beta
190echo $f:t:r:u
191# prints Biota
192echo $f:t:r:u:s/eta/iota/
193
194# --- Redirection -------------------------------------------------------------
195
196# Create file.txt and write the standard output to it
197echo 'this string' > file.txt
198# Create file.txt and write the standard output and standard error to it
199echo 'this string' >& file.txt
200# Append the standard output to file.txt
201echo 'this string' >> file.txt
202# Append the standard output and standard error to file.txt
203echo 'this string' >>& file.txt
204# Redirect the standard input from file.txt
205cat < file.txt
206# Input from keyboard; this stores the input line to variable `x`
207set x = $<
208# Document here;
209cat << LABEL
210...text here...
211LABEL
212
213# TIP: this is how to get standard error separated:
214(grep 'AGP' /usr/src/linux/Documentation/* > output-file.txt) >& error-file.txt
215
216# example: read a name from standard input and display a greetings message
217echo -n "Enter your name: "
218set name = $<
219echo "Greetings $name"
220
221# --- Expressions ------------------------------------------------------------
222
223# Operators:
224# == equal != not equal ! not
225# > greater than < less than >= greater or equal <= less or equal
226# && logical AND || logical OR
227
228if ( $name != $user ) then
229 echo "Your name isn't your username"
230else
231 echo "Your name is your username"
232endif
233
234# single-line form
235if ( $name != $user ) echo "Your name isn't your username"
236
237# NOTE: if $name is empty, tcsh sees the above condition as:
238# if ( != $user ) ...
239# which is invalid syntax
240# The "safe" way to use potentially empty variables in tcsh is:
241# if ( "$name" != $user ) ...
242# which, when $name is empty, is seen by tcsh as:
243# if ( "" != $user ) ...
244# which works as expected
245
246# There is also conditional execution
247echo "Always executed" || echo "Only executed if the first command fails"
248echo "Always executed" && echo "Only executed if the first command does NOT fail"
249
250# To use && and || with if statements, you don't need multiple pairs of
251# square brackets:
252if ( "$name" == "Steve" && "$age" == 15 ) then
253 echo "This will run if $name is Steve AND $age is 15."
254endif
255
256if ( "$name" == "Daniya" || "$name" == "Zach" ) then
257 echo "This will run if $name is Daniya OR Zach."
258endif
259
260# String matching operators ( `=~` and `!~` )
261# The ‘==’ ‘!=’ ‘=~’ and ‘!~’ operators compare their arguments as strings;
262# all others operate on numbers. The operators ‘=~’ and ‘!~’ are like ‘!=’
263# and ‘==’ except that the right hand side is a glob-pattern against which
264# the left-hand operand is matched.
265
266if ( $user =~ ni[ck]* ) echo "Greetings Mr. Nicholas."
267if ( $user !~ ni[ck]* ) echo "Hey, get out of Nicholas' PC."
268
269# Arithmetic expressions are denoted with the following format:
270@ result = 10 + 5
271echo $result
272
273# Arithmetic Operators
274# +, -, *, /, %
275#
276# Arithmetic Operators which must be parenthesized
277# !, ~, |, &, ^, ~, <<, >>,
278# Compare and logical operators
279#
280# All operators are the same as in C.
281
282# It is non so well documented that numeric expressions require spaces
283# in-between; Also, `@` has its own parser, it seems that it works well when
284# the expression is parenthesized, otherwise the primary parser seems to be
285# active. Parentheses require spaces around, this is documented.
286
287# wrong
288@ x = $y+1
289@ x = 0644 & 022; echo $x
290@ x = (0644 & 022) +1; echo $x
291@ x = (0644 & 022)+ 1; echo $x
292@ x = ( ~077 ); echo $x
293
294# correct
295@ x = $y + 1
296@ x = ( 0644 & 022 ) + 1; echo $x
297@ x = ( ~ 077 ); echo $x
298@ x = ( ~ 077 | 022 ); echo $x
299@ x = ( ! 0 ); echo $x
300
301# C's operators ++ and -- are supported if there is not assignment
302@ result ++
303
304# No shell was created to do mathematics;
305# Except for the basic operations, use an external command with backslashes.
306#
307# I suggest the calc as the best option.
308# (http://www.isthe.com/chongo/tech/comp/calc/)
309#
310# The standard Unix's bc as the second option
311# (https://www.gnu.org/software/bc/manual/html_mono/bc.html)
312#
313# The standard Unix's AWK as the third option
314# (https://www.gnu.org/software/gawk/manual/gawk.html)
315
316# You can also use `Perl`, `PHP`, `python`, or even several BASICs, but prefer
317# the above utilities for faster load-and-run results.
318
319# real example: (that I answer in StackExchange)
320# REQ: x := 1001b OR 0110b
321
322# in `tcsh` expression (by using octal)
323@ x = ( 011 | 06 ); echo $x
324
325# the same by using `calc` (and using binary as the original req)
326set x = `calc '0b1001 | 0b110'`; echo $x
327
328# --- File Inquiry Operators --------------------------------------------------
329# NOTE: The built-in `filetest` command does the same thing.
330
331#### Boolean operators
332# -r read access -w write access -x execute access -e existence
333# -f plain file -d directory -l symbolic link -p named pipe
334# -S socket file
335# -o ownership -z zero size -s non-zero size
336# -u SUID is set -g SGID is set -k sticky is set
337# -b block device -c char device
338# -t file (digit) is an open file descriptor for a terminal device
339
340# If the file `README` exists, display a message
341if ( -e README ) echo "I have already README file"
342
343# If the `less` program is installed, use it instead of `more`
344if ( -e `where less` ) then
345 alias more 'less'
346endif
347
348#### Non-boolean operators
349# -Z returns the file size in bytes
350# -M returns the modification time (mtime) -M: returns mtime string
351# -A returns the last access time (atime) -A: returns atime string
352# -U returns the owner's user ID -U: returns the owner's user name
353# -G returns the owner's group ID -G: returns the owner's group name
354# -P returns the permissions as octal number -Pmode returns perm. AND mode
355
356# this will display the date as a Unix-time integer: 1498511486
357filetest -M README.md
358
359# This will display "Tue Jun 27 00:11:26 2017"
360filetest -M: README.md
361
362# --- Basic Commands ----------------------------------------------------------
363
364# Navigate through the filesystem with `chdir` (cd)
365cd path # change working directory
366cd # change to the home directory
367cd - # change to the previous directory
368cd .. # go up one directory
369
370# Examples:
371cd ~/Downloads # go to my `Downloads` directory
372
373# Use `mkdir` to create new directories.
374mkdir newdir
375# The `-p` flag causes new intermediate directories to be created as necessary.
376mkdir -p ~/.backup/saves
377
378# which & where
379# find if csh points to tcsh
380ls -lha `which csh`
381# find if csh is installed on more than one directory
382where csh
383
384# --- Pipe-lines --------------------------------------------------------------
385# A pipeline is a sequence of processes chained together by their standard
386# streams, so that the output of each process (stdout) feeds directly as input
387# (stdin) to the next one. These `pipes` are created with the `|` special
388# character and it is one of the most powerful characteristics of Unix.
389
390# example:
391ls -l | grep key | less
392# "ls -l" produces a process, the output (stdout) of which is piped to the
393# input (stdin) of the process for "grep key"; and likewise for the process
394# for "less".
395
396# the `ls`, the `grep`, and the `less` are Unix programs and they have their
397# own man-page. The `pipe` mechanism is part of the kernel but the syntax
398# and the control is the shell's job, the tcsh in our case.
399
400# NOTE: Windows has the `pipe` mechanism too, but it is buggy and I signed it
401# for all versions until Windows XP SP3 API32 which was the last one that I
402# worked on. Microsoft denied it, but it is a well-known bug since it is a
403# common method for inter-process communication. For small I/O it will work well.
404# tcsh, along with grep, GCC, and Perl is one of the first Unix programs that
405# ported to DOS (with EMX DOS extender) and later to Windows (1998).
406
407# example: this will convert tcsh to PostScript and will show it with Okular
408zcat /usr/man/man1/tcsh.1.gz | groff -Tps -man | okular -
409
410# a better version
411zcat `locate -b -n 1 '\tcsh.1.gz'` | groff -Tps -man | okular -
412
413# even better
414set page = tcsh; set loc = (locate -b -n 1 "\\\\"${page}".1.gz");
415 zcat `eval $loc` | groff -Tps -man | okular -
416
417# the same, modified to create man page pdf
418set page = tcsh; set loc = (locate -b -n 1 "\\\\"${page}".1.gz");
419 zcat `eval $loc` | groff -Tps -man | ps2pdf - ${page}.pdf
420
421# the same, but now shows the ${page}.pdf too
422set page = tcsh; set loc = (locate -b -n 1 "\\\\"${page}".1.gz");
423 zcat `eval $loc` | groff -Tps -man | ps2pdf - ${page}.pdf && okular tcsh.pdf
424
425# NOTE: `okular` is the default application of the KDE environment and it shows
426# postcript and pdf files. You can replace it with your lovely PDF viewer.
427# `zcat`, `locate`, `groff`, are common programs in all Unixes. The `ps2pdf`
428# program is part of the `ghostscript` package that is widely used.
429
430# --- Control Flow ------------------------------------------------------------
431
432#### IF-THEN-ELSE-ENDIF
433# Syntax:
434# if ( expr ) then
435# ...
436# [else if ( expr2 ) then
437# ...]
438# [else
439# ...]
440# endif
441#
442# If the specified `expr` is true then the commands to the first else are
443# executed; otherwise if `expr2` is true then the commands to the second else
444# are executed, etc.
445# Any number of else-if pairs are possible; only one endif is needed.
446#
447# Single-line form:
448#
449# if ( expr ) command
450#
451# If `expr` evaluates to true, then the command is executed.
452# `command` must be a simple command, not an alias, a pipeline, a command list
453#, or a parenthesized command list. With a few words, avoid using it.
454#
455# BUG: Input/output redirection occurs even if expr is false and the command
456# is thus not executed.
457#
458
459# check if we are in a non-interactive shell and quit if true
460if ( $?USER == 0 || $?prompt == 0 ) exit
461
462# check if we are a login shell
463if ( $?loginsh ) then
464 # check if you are on linux console (not X's terminal)
465 if ( $tty =~ tty* ) then
466 # enable keypad application keys (man console_codes)
467 echo '\033='
468 endif
469endif
470
471#### SWITCH-ENDSW
472# Syntax:
473# switch ( expr )
474# case pattern:
475# ...
476# [breaksw]
477# [default:
478# ...]
479# endsw
480#
481# tcsh uses a case statement that works similarly to switch in C.
482# Each case label is successively matched, against the specified string which
483# is first command and filename expanded. The file metacharacters `*`, `?`
484# and `[...]` may be used in the case labels. If none of the labels match the
485# execution begins after the default label if it's defined.
486# The command `breaksw` causes execution to continue after the endsw. Otherwise,
487# control may fall through case labels and default labels as in C.
488
489switch ( $var )
490case *.[1-9]:
491case *.[1-9].gz:
492 echo "$var is a man-page."
493 breaksw
494case *gz:
495 echo "$var is gzipped"
496 breaksw
497default:
498 file $var
499endsw
500
501#### FOREACH-END
502# Syntax:
503# foreach name ( wordlist )
504# ...
505# [break | continue]
506# end
507#
508# Successively sets the variable `name` to each member of `wordlist` and
509# executes the sequence of commands between this command and the matching
510# `end` keyword. The `continue` keyword jumps to the next element back to
511# top, and the `break` keyword terminates the loop.
512#
513# BUG: `foreach` doesn't ignore here documents when looking for its end.
514
515# example: counting 1 to 10
516foreach i ( `seq 1 10` )
517 echo $i
518end
519
520# example: type all files in the list
521foreach f ( a.txt b.txt c.txt )
522 cat $f
523end
524
525# example: convert wma to ogg
526foreach f ( *.wma )
527 ffmpeg -i "$f" "$f:r".ogg
528end
529
530#### WHILE-END
531# while ( expr )
532# ...
533# [break | continue]
534# end
535#
536# Executes the commands between the `while` and the matching `end` while `expr`
537# evaluates non-zero. `break` and `continue` may be used to terminate or
538# continue the loop prematurely.
539
540# count from 1 to 10
541set num = 1
542while ( $num <= 10 )
543 echo $num
544 @ num ++
545end
546
547# print all directories of CWD
548set lst = ( * )
549while ( $#lst )
550 if ( -d $lst[1] ) echo $lst[1] is directory
551 shift lst
552end
553
554# separate command-line arguments to options or parameters
555set options
556set params
557set lst = ( $* )
558while ( $#lst )
559 if ( "$lst[1]" =~ '-*' ) then
560 set options = ( $options $lst[1] )
561 else
562 set params = ( $params $lst[1] )
563 endif
564 shift lst
565end
566echo 'options =' $options
567echo 'parameters =' $params
568
569#### REPEAT
570# Syntax: repeat count command
571#
572# The specified command, which is subject to the same restrictions as the
573# command in the one line `if` statement above, is executed count times.
574# I/O redirections occur exactly once, even if `count` is 0.
575#
576# TIP: in most cases prefer `while`
577
578repeat 3 echo "ding dong"
579
580# --- Functions ---------------------------------------------------------------
581# tcsh has no functions but its expression syntax is advanced enough to use
582# `alias` as functions. Another method is recursion
583
584# Alias argument selectors; the ability to define an alias to take arguments
585# supplied to it and apply them to the commands that it refers to.
586# Tcsh is the only shell that provides this feature.
587#
588# \!# argument selector for all arguments, including the alias/command
589# itself; arguments need not be supplied.
590# \!* argument selector for all arguments, excluding the alias/command;
591# arguments need not be supplied.
592# \!$ argument selector for the last argument; argument need not be supplied,
593# but if none is supplied, the alias name is considered to be the
594# last argument.
595# \!^ argument selector for first argument; argument MUST be supplied.
596# \!:n argument selector for the nth argument; argument MUST be supplied;
597# n=0 refers to the alias/command name.
598# \!:m-n argument selector for the arguments from the mth to the nth;
599# arguments MUST be supplied.
600# \!:n-$ argument selector for the arguments from the nth to the last;
601# at least argument n MUST be supplied.
602
603# Alias the cd command so that when you change directories, the contents
604# are immediately displayed.
605alias cd 'cd \!* && ls'
606
607# --- Recursion method --- begin ---
608#!/bin/tcsh -f
609set todo = option1
610if ( $#argv > 0 ) then
611 set todo = $argv[1]
612endif
613
614switch ( $todo )
615case option1:
616# ...
617 $0 results
618 breaksw
619case option2:
620# ...
621 $0 results
622 breaksw
623case results:
624 echo "print the results here"
625# ...
626 breaksw
627default:
628 echo "Unknown option: $todo"
629# exit 0
630endsw
631# --- Recursion method --- end ---
632
633# --- examples ----------------------------------------------------------------
634
635# this script prints available power-states if no argument is set;
636# otherwise it sets the state of the $argv[1]
637# --- power-state script --- begin --------------------------------------------
638#!/bin/tcsh -f
639# get parameter ("help" for none)
640set todo = help
641if ( $#argv > 0 ) then
642 set todo = $argv[1]
643endif
644# available options
645set opts = `cat /sys/power/state`
646# is known?
647foreach o ( $opts )
648 if ( $todo == $o ) then
649 # found; execute it
650 echo -n $todo > /sys/power/state
651 break
652 endif
653end
654# print help and exit
655echo "usage: $0 [option]"
656echo "available options on kernel: $opts"
657# --- power-state script --- end ----------------------------------------------
658
659# Guess the secret number game
660# --- secretnum.csh --- begin -------------------------------------------------
661#!/bin/tcsh -f
662set secret=`shuf -i1-100 -n1`
663echo "I have a secret number from 1 up to 100"
664while ( 1 )
665 echo -n "Guess: "
666 set guess = $<
667 if ( $secret == $guess ) then
668 echo "You found it"
669 exit 1
670 else
671 if ( $secret > $guess ) then
672 echo "its greater"
673 else if ( $secret < $guess ) then
674 echo "its lesser"
675 endif
676 endif
677 endif
678end
679# --- secretnum.csh --- end ---------------------------------------------------
680
681# -----------------------------------------------------------------------------
682# Appendices
683
684#### About [T]CSH:
685# * CSH is notorious for its bugs;
686# * It is also famous for its advanced interactive mode.
687# * TCSH is famous for having the most advanced completion subsystem.
688# * TCSH is famous for having the most advanced aliases subsystem; aliases
689# can take parameters and often be used as functions!
690# * TCSH is well known and preferred by people (me too) because of better
691# syntax. All shells are using Thomson's syntax with the exception of
692# [t]csh, fish, and plan9's shells (rc, ex).
693# * It is smaller and consumes far less memory than bash, zsh, and even mksh!
694# (memusage reports)
695# * TCSH still has bugs; fewer, but it does; if you write readable clean code
696# you'll find none; well almost none... This has to do with the implementation
697# of csh; that doesn't mean the other shells have a good implementation.
698# * no well-known shell is capable of regular programming; if your script
699# is getting big, use a programming language, like Python, PHP, or Perl (good
700# scripting languages).
701#
702# Advice:
703# 1. Do not use redirection in single-line IFs (it is well documented bug)
704# In most cases avoid using single-line IFs.
705# 2. Do not mess up with other shells' code, c-shell is not compatible with
706# other shells and has different abilities and priorities.
707# 3. Use spaces as you'll use them to write readable code in any language.
708# A bug of csh was `set x=1` and `set x = 1` worked, but `set x =1` did not!
709# 4. It is well documented that numeric expressions require spaces in between;
710# also parenthesize all bit-wise and unary operators.
711# 5. Do not write a huge weird expression with several quotes, backslashes, etc
712# It is bad practice for generic programming, it is dangerous in any shell.
713# 6. Help tcsh, report the bug here <https://bugs.gw.com/>
714# 7. Read the man page, `tcsh` has a huge number of options and variables.
715#
716# I suggest the following options enabled by default
717# --------------------------------------------------
718# Even in non-interactive shells
719# set echo_style=both
720# set backslash_quote
721# set parseoctal
722# unset noclobber
723#
724# Whatever...
725# set inputmode=insert
726# set autolist
727# set listjobs
728# set padhour
729# set color
730# set colorcat
731# set nobeep
732# set cdtohome
733#
734# set histdup
735# set histlit
736# set nohistclop
737#
738# unset compat_expr
739# unset noglob
740# unset autologout
741# unset time
742# unset tperiod
743#
744# NOTE: If the `backslash_quote` is set, it may create compatibility issues
745# with other tcsh scripts that were written without it.
746#
747# NOTE: The same for `parseoctal`, but it is better to fix the problematic
748# scripts.
749#
750# NOTE: **for beginners only**
751# This enables automatic rescanning of `path` directories if needed. (like bash)
752# set autorehash
753
754#### common aliases
755# alias hist 'history 20'
756# alias ll 'ls --color -lha'
757# alias today "date '+%d%h%y'
758# alias ff 'find . -name '
759
760#### a nice prompt
761# set prompt = "%B%{\033[35m%}%t %{\033[32m%}%n@%m%b %C4 %# "