-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_aliases
48 lines (36 loc) · 1.11 KB
/
.bash_aliases
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
43
44
45
46
47
48
# ~/.bash_aliases
# Enable color support for commands
if [ -x /usr/bin/dircolors ]; then
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Add useful ls aliases
alias ll='ls -hAlF'
alias la='ls -A'
alias l='ls -CF'
# Get rid of a boring test...
alias sl='ls'
# Jobs management
alias jobs='jobs -l'
# Enable default options of mkdir
alias mkdir='mkdir -pv'
# Make commands more human-readable
alias mount='mount | column -t'
alias df='df -H'
alias du='du -ch'
# Prompt when removing more than 3 files
alias rm='rm -i --preserve-root'
# Increase safety when managing files
alias mv='mv -vi'
alias cp='cp -vi'
alias ln='ln -vi'
# Show opened ports
alias ports='netstat -tulanp'
# Add an "alert" alias for long running commands. Use like so: sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Make less display colors
export LESS="-R"