2 # /etc/bash.bashrc: System-wide rc file for interactive bash(1) shells.
3 # Written 2003-2009 by Alexander Barton (alex@barton.de)
6 [ -e ~/.ConfigScripts.debug ] && echo " >> /etc/bash.bashrc ..."
10 [ -z "$PROFILEREAD" -a -r /etc/profile ] && source /etc/profile
14 [ -r "/var/lib/$ME/bash.bashrc" ] && source /var/lib/$ME/bash.bashrc
22 set mark-directories on
23 set mark-symlinked-directories on
24 HISTCONTROL=ignoredups
28 ssh -o "StrictHostKeyChecking no" "$@"
31 ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" "$@"
35 prefix="${chroot_name:+($chroot_name)}"
37 && PS1="${prefix}\h:\w \\\$ " \
38 || PS1="${prefix}\u@\h:\w \\\$ "
40 # Enable bash completion, if available
41 [ -z "$BASH_COMPLETION" -a -r /etc/bash_completion ] \
42 && source /etc/bash_completion
43 [ -z "$BASH_COMPLETION" -a -r /opt/local/etc/bash_completion ] \
44 && source /opt/local/etc/bash_completion
46 # If the command-not-found package is installed, use it
47 if [ -x /usr/lib/command-not-found ]; then
48 function command_not_found_handle {
49 # Check because c-n-f could've been removed in the meantime
50 if [ -x /usr/lib/command-not-found ]; then
51 /usr/bin/python /usr/lib/command-not-found -- $1
59 # Common command aliases
60 alias ","="clear && logout"
65 alias "lasth"="last | head -n \`expr \\\$LINES - 2\`"
67 # Aliases for screen(1), if installed
68 type -p screen >/dev/null 2>&1
71 alias "sr"="screen -dr"
72 alias "sx"="screen -x"
75 # less(1) filter, if available
76 type -p lesspipe >/dev/null 2>&1 && eval `lesspipe`
78 # Initialize ccache(1), if installed
79 if [ -d "/usr/lib/ccache" ]; then
80 PATH="/usr/lib/ccache:$PATH"
81 # Set the cache directory to local storage, if available
82 [ -w "/usr/local/home/$USER" ] \
83 && export CCACHE_DIR="/usr/local/home/$USER/.ccache"
86 # Setup slrn(1) and cleanscore(1), if installed
87 type -p cleanscore >/dev/null 2>&1
88 [ $? -eq 0 ] && alias slrn="cleanscore -f ~/.slrnscore && slrn"
90 # Enable color support of ls(1) and also add handy aliases
91 if [ "$TERM" != "dumb" ]; then
92 type -p dircolors >/dev/null 2>&1 && eval `dircolors -b`
93 ls --color / >/dev/null 2>&1
96 alias ls="ls --color=auto -F"
98 ls -G / >/dev/null 2>&1
106 # If this is an xterm set the title to user@host:dir
109 PROMPT_COMMAND='printf "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
115 # Source local files, if readable
116 [ -r "/etc/bashrc.local" ] && source /etc/bashrc.local
117 [ -r "/etc/bash.bashrc.local" ] && source /etc/bash.bashrc.local
118 [ -r "/var/lib/$ME/bash.bashrc" ] && source /var/lib/$ME/bash.bashrc