# -*- shell-script -*-
#
# Joerg Arndt's  .profile/.bashrc
# ... online at http://www.jjj.de/
# your feedback is welcome  mailto: arndt (AT) jjj.de
#
# version: 2003-March-26 (23:44)
#
# you might want to make your .bashrc a link to this file:
# ln -sv .profile .bashrc
#
if test -n "$BASH_VERSION"; then # ------- BASH ONLY
### programmable completion for bash:
    complete -A directory cd rmdir rd
    complete -A file grep
    complete -A command type
    complete -A function function
    complete -A alias alias
    complete -A variable export ev unset
#    complete -A variable -P '$' echo
    complete -A shopt shopt
    complete -A setopt set
    complete -A builtin builtin
    complete -A user talk
    complete -A helptopic help
    complete -A hostname ping

# If set, bash checks the window size after each command and, if
# necessary, updates the values of LINES and COLUMNS.
    shopt -s checkwinsize

# If  set,  and  readline is being used, bash will not attempt to
# search  the  PATH  for possible  completions  when  completion
# is attempted on an empty line.
    shopt -s no_empty_cmd_completion

# If  set,  minor errors in the spelling of a directory component in
# a cd command will be corrected. The errors checked for are transposed
# characters, a missing character, and  one  character too many.
    shopt -s cdspell

# If  set, and readline is being used, the results of history
# substitution are not immediately passed to the shell parser.
# Instead, the resulting line is loaded into the readline editing
# buffer, allowing further modification.
    shopt -s histverify
fi # ------- BASH ONLY


# A colon-separated list of suffixes to ignore when performing
# filename completion A file name whose suffix matches one of the
# entries in `FIGNORE' is excluded from the list of matched file
# names.  A sample value is `.o:~'
FIGNORE=".o:~"

# Set to a value of `ignorespace', it means don't enter lines which
# begin with a space or tab into the history list.  Set to a value
# of `ignoredups', it means don't enter lines which match the last
# entered line.  A value of `ignoreboth' combines the two options.
# Unset, or set to any other value than those above, means to save
# all lines on the history list.
export HISTCONTROL=ignoredups

# The number of commands to remember in the command history
# The default value is 500.
export HISTSIZE=300
export HISTFILESIZE=${HISTSIZE}

# The  name  of  the file in which command history is
# saved.  The  default  value  is ~/.bash_history.
# If unset, the command history is not saved when an
# interactive shell exits.
#unset HISTFILE

# Notify of job termination immediately:
set -o notify  # same as -b

# do not follow (i.e. expand) symbolic links:
set -o physical  # same as -P

# if home dir contains a link make dirs show it as ~ anyway:
#export HOME=$(cd; pwd;)

# logout (only) after typing ignoreeof plus one ctrl-d:
export ignoreeof=1

# max core file size:
ulimit -c 0

# prompt
unset PS1
export PS1="\u@\h:\w/ # "
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin;
export EDITOR=vim
export PAGER=less
