-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbashrc
42 lines (36 loc) · 1.31 KB
/
bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Use saner defaults
if [ -f ~/.bash-sensible/sensible.bash ]; then
source ~/.bash-sensible/sensible.bash
fi
# Prompt
PS1='\[\033[01;32m\]\D{%T}\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;37m\]\$\[\033[00m\] '
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# Colors
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
# Completions
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
source /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
fi
# Aliases
alias ls='ls --classify --group-directories-first --color=auto'
alias l='ls -l --human-readable --classify --group-directories-first --color=auto'
alias ll='ls -l --human-readable --classify --group-directories-first --color=auto'
alias la='ls -l --almost-all --human-readable --classify --group-directories-first --color=auto'
alias grep='grep --color=auto'
alias egrep='grep --color=auto'
alias zgrep='grep --color=auto'
alias du='du -h'
alias df='df -h'