HEPiX Shells Scripts - Others
This page describes the different aliases, shell variables, shell options
that are used by the %hs.
%index
%%HEP Aliases%%
- pp
pp <pattern> is an alias for a grep in the process list
defined to hide the system differences between System V (ps -ef) and
BSD Systems (ps -aux).
- ll
ll for a long directory listing which is defined on many systems
as a default command.
- findfile
ff <pattern> for a frequently-used version of the find command.
The find alias searches from the current directory.
- nman
nroff -man | $PAGER
- passwd
passwd for systems where the environment variable YP is set
to "YES" . The yppasswd is aliased to passwd.
- pwd
echo "$cwd" in [t]csh
- rs
an alias for eval `resize` and resize your terminal.
set noglob;eval `resize`;unset noglob
The following are site
- h
history
- l
ls -lt
- lf
ls -CF
- terminal
setenv TERM `/bin/tset - !*`
This last command resets your terminal.
%%HEP Level - Shell Variables%%
The protection of these files prevents the shell to loop, trying to
"re-execute" the same files. It is usefully introduced to allow
the installation enforced mode and weak mode
- hep_env_csh
Shell variable which protects HEP_csh.cshrc file.
- hep_env_sh
Shell variable which protects HEP_zshenv file.
- hep_login_csh
Shell variable which protects HEP_csh.login file.
- hep_login_sh
Shell variable which protects HEP_profile and HEP_zprofile files.
- hep_kshrc
Shell variable which protects HEP_kshrc file.
%%Shell customisations%%
The following special interactive features of the shells will be
enabled if possible:
History mechanism
The history file is set to $HOME/.history.$HOST.
Command line editing
Command line editing with the arrow keys (doesn't work in most csh versions)
up arrow up-history
down arrow down-history
right arrow forward-char
left arrow backward-char
In the zsh and tcsh you have also key bindings like the emacs key
binding described later, especially for a history-search-backward and
history-search-forward with the Page-Up/Prev-Page and
Page-Down/Next-Page key and the Insert and Delete key, if present,
work as expected.
Completion
All described shells support the word completion feature. In typing commands
only a unique abbreviation is necessary. When you type a TAB (zsh,tcsh,bash),
ESC (csh) or ESC ESC (ksh) it will complete the name for you. For the tcsh
and zsh a context dependent completion mechanism for the most
frequently used commands has been configured. For example a cd command
followed by the TAB key only completes (or displays, if ambiguous) directories.
\item In some shells directories are indicated with a trailing `/', executable
files with a `*', symbolic links with a '@' and FIFOs (named pipes) with a
'$|$'.
For more special features see the manuals of these shells.
%%Shell by shell features%%
C-shell - csh
HEP level
- filec
command completion.
- noclobber
'>' does not overwrite.
- ignoreeof
Control D doest not exit you from your session.
You must enter 'exit' or 'logout'.
- notify
Job notification while exiting.
- savehist
40
- history
100
- histfile
~/.history.$HOST
- time
100
Site level
The history file had been disabled.
Korn shell - ksh
HEP level
- HISTSIZE
100, retain the last 100 commands.
- HISTFILE
$HOME/.history.$HOST name of history file.
- set -o emacs
sets the emacs way of using the command line
- set -o ignoreeof
you can't exit with Ctrl-D. You have to enter 'exit'.
- alias __A
"^P"
- alias __B
"^N"
- alias __C
"^F"
- alias __D
"^B"
The last 4 aliases enables the use of the arrow keys which is working
in xterm but not in hpterm.
Site level
- set -o ignoreeof
you can't exit with Ctrl-D. You have to enter 'exit'.
The history file had been disabled. The history is not cached anymore into
a file but in separated temporary files per session which are removedat the end
of the session. It avoids nasty ksh bugs.
Bourne Again shell - bash
HEP level
- HISTSIZE
100, retain the last 100 commands.
- HISTFILE
$HOME/.history.$HOST name of history file.
Tenex C-shell - tcsh
HEP level
- filec
completion.
- fignore
( .o .dvi .aux .toc .lot .lof .log .blg .bbl .bak
.BAK .sav .old .trace )
- autolist
on
- showdots
on
- lcd
add parents of frequently used directories
( ) .
- cdpath
(. .. ~ ~/bin ~/src $lcd)
- noclobber
'>' do not overwrite.
- ignoreeof
you can't exit with Ctrl-D. You have to enter 'exit'.
- notify
Job notification while exiting.
- savehist
40
- history
100
- histfile
~/.history.$HOST
- time
100
Site level
The history file is disabled.
Z shell - zsh
HEP level
Variables and parameters
- HISTSIZE
100, retain the last 100 commands.
- SAVEHIST
40
- HISTFILE
$HOME/.history.$HOST name of history file.
- LOGCHECK
0
- DIRSTACKSIZE
30
- fignore
( .o .dvi .aux .toc .lot .lof .log .blg .bbl .bak
.BAK.sav .old .trace )
- cdpath
(. .. ~ ~/bin ~/src)
- ignoreeof
5
%%Options%%
- appendhistory
If this is set, zsh sessions will append their
history list to the history file, rather than
overwrite it. Thus, multiple parallel zsh
sessions
will all have their history lists added to the
history file, in the order they are killed.
- autocd
If a command is not in the hash table, and there
exists an executable directory by that name,
perform the cd command to that directory.
- autolist
Automatically list choices on an ambiguous
command completion.
- automenu
Automatically use menu completion after the second
consecutive request for completion, for example by
pressing the TAB key repeatedly.
This option is
overridden by menucomplete.
- autopushd
Make cd act like pushd.
- autoresume
Treat single word simple commands without
redirection as candidates for resumption of an
existing job.
- cdablevars
If the argument to a cd command
(or an implied cd
with the autocd option set)
is not a directory,
and does not begin with a slash, try to expand the
expression as if it were preceded by a ~ (see
Filename Expansion in document 163 ``tcsh and zsh
for pedestrians'' available from the CERN UCO).
- completeinword
If unset, the cursor is set to the end of the word
if completion is started. Otherwise it stays there
and completion is done from both ends.
- extendedglob
Treat the #, ~ and
^ characters as part of
patterns for filename generation, etc. (An
initial unquoted ~ always produces
named directory
expansion as in Filename Expansion in document
163``tcsh and zsh
for pedestrians'' available from the CERN UCO.)
- globdots
Do not require a leading . in a filename to be
matched explicitly.
- histignoredups
Do not enter command lines into the history list
if they are duplicates of the previous event.
- histignorespace
Do not enter command lines into the history list
if any command on the line begins with a blank.
- histnostore
Remove the history command from the
history when invoked.
- ignoreeof
Do not exit on end-of-file. Require the use of
exit or logout instead.
- kshoptionprint
Alters the way options settings are printed.
- listtypes
When listing files that are possible completions,
show the type of each file with a trailing
identifying mark.
- longlistjobs
List jobs in the long format by default.
- mailwarning
Print a warning message if a mail file has been
accessed since the shell last checked.
- notify
Report the status of background jobs immediately,
rather than waiting until just before printing a
prompt.
- noclobber
Prevents > redirection from truncating
existing
files. >! may be used to truncate a file
instead.
Also prevents >> from creating files.
>>! may be used instead.
- nohup
Don't send the HUP signal to running jobs when the
shell exits.
- pushdignoredups
Don't push multiple copies of the same directory
onto the directory stack.
- pushdminus
Changes the behaviour of popd and affects
its arguments.
- pushdsilent
Do not print the directory stack after
pushd or popd.
- pushdtohome
Have pushd with no arguments act like
pushd $HOME.
- rcquotes
Allow the character sequence '' to signify a
single quote within singly quoted strings.
- recexact
In completion, recognize exact matches even if
they are ambiguous.
Site level
The following options have been unset.
- completeinword
- globdots
- ignoreeof
- notify
- noclobber
- nohup
Others
Arnaud Taddei, 8-Jul-1996