Bash Configuration File
Features
- Colouring of Shell: 'red' means root, 'green' means regular user
- Coloured ls
- Grep with colouring
- Interactive rm, mv,...
- Perl CPAN console
- vi as default editor
The Configuration File
# # COLOR definitions for our prompt # # Black 0;30 Dark Gray 1;30 # Blue 0;34 Light Blue 1;34 # Green 0;32 Light Green 1;32 # Cyan 0;36 Light Cyan 1;36 # Red 0;31 Light Red 1;31 # Purple 0;35 Light Purple 1;35 # Brown 0;33 Yellow 1;33 # Light Gray 0;37 White 1;37 # COLOR_RESET='\[\033[0m\]' COLOR_PATH='\[\033[1;34m\]' COLOR_ROOT='\[\033[1;31m\]' COLOR_HOST='\[\033[1;32m\]' # set a fancy prompt (non-color) export TERM=xterm-color if [ ${UID} -eq 0 ] ; then export PS1="${COLOR_ROOT}\u@\h${COLOR_RESET}:${COLOR_PATH}\w${COLOR_RESET}# " else export PS1="${COLOR_HOST}\u@\h${COLOR_RESET}:${COLOR_PATH}\w${COLOR_RESET}\$ " fi; # enable bash completion in interactive shells if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi # You may uncomment the following lines if you want `ls' to be colorized: export LS_OPTIONS='--color=auto' eval `dircolors` alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lhA' alias cpan='perl -MCPAN -e shell'; # Some more alias to avoid making mistakes: alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' alias ln='ln -i' alias grep='grep --color=auto' # vi as default editor (crontab etc...) export EDITOR=/usr/bin/vi
- Views -
Page -
Discussion -
View source -
History -
- Personal tools - Log in -
- Special - Special pages -
- Personal tools - Log in -
- Special - Special pages -