2011-09-23 14:21:36 +00:00
|
|
|
# /etc/bashrc: DO NOT EDIT -- this file has been generated automatically.
|
|
|
|
|
|
|
|
if [ \( -n "${SYSTEM_ETC_BASHRC_HAS_BEEN_SOURCED:-}" \) -o \( -n "${NOSYSBASHRC:-}" \) ]; then
|
2009-06-26 11:36:38 +00:00
|
|
|
return
|
2011-09-23 14:21:36 +00:00
|
|
|
else
|
|
|
|
SYSTEM_ETC_BASHRC_HAS_BEEN_SOURCED="1"
|
2009-05-28 22:02:47 +00:00
|
|
|
fi
|
2009-06-26 11:36:38 +00:00
|
|
|
|
2011-09-23 14:21:36 +00:00
|
|
|
. /etc/profile
|
|
|
|
|
|
|
|
# If we are an interactive shell ...
|
2011-02-08 14:58:41 +00:00
|
|
|
if [ -n "$PS1" ]; then
|
2011-09-23 14:21:36 +00:00
|
|
|
# Check the window size after every command.
|
2011-02-08 14:58:41 +00:00
|
|
|
shopt -s checkwinsize
|
2011-08-06 18:55:00 +00:00
|
|
|
|
2011-09-23 14:21:36 +00:00
|
|
|
# Provide a nice prompt.
|
|
|
|
PROMPT_COLOR="1;31m"
|
|
|
|
let $UID && PROMPT_COLOR="1;32m"
|
|
|
|
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
|
|
|
|
if test "$TERM" = "xterm"; then
|
|
|
|
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
|
2010-02-13 00:07:12 +00:00
|
|
|
fi
|
2011-09-23 14:21:36 +00:00
|
|
|
|
|
|
|
# Check whether we're running a version of Bash that has support for
|
|
|
|
# programmable completion. If we do, and if the current user has
|
|
|
|
# installed the package 'bash-completion' in her $HOME/.nix-profile,
|
|
|
|
# then completion is enabled automatically.
|
|
|
|
if [ -f "$HOME/.nix-profile/etc/bash_completion" ]; then
|
|
|
|
if [ -d "$HOME/.nix-profile/etc/bash_completion.d" ]; then
|
|
|
|
if shopt -q progcomp &>/dev/null; then
|
|
|
|
BASH_COMPLETION_DIR="$HOME/.nix-profile/etc/bash_completion.d"
|
|
|
|
BASH_COMPLETION="$HOME/.nix-profile/etc/bash_completion"
|
|
|
|
. "$BASH_COMPLETION"
|
|
|
|
fi
|
|
|
|
fi
|
2010-02-13 00:07:12 +00:00
|
|
|
fi
|
2011-09-23 14:21:36 +00:00
|
|
|
|
|
|
|
# Some aliases.
|
|
|
|
alias which="type -P"
|
2010-02-13 00:07:12 +00:00
|
|
|
fi
|