-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnew_bashrc
74 lines (62 loc) · 1.91 KB
/
new_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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# .bashrc
HISTSIZE=
HISTFILESIZE=
export PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
# User specific aliases and functions
alias c='clear'
# ls
alias ls='ls -hF'
alias lr='ls -R' # recursive ls
alias ll='ls -l'
alias la='ll -A'
alias lx='ll -BX' # sort by extension
alias lz='ll -rS' # sort by size
alias lt='ll -rt' # sort by date
alias lm='la | more'
alias l='ls'
# modified commands
alias grep='grep --color=auto'
alias more='less'
alias df='df -h'
alias du='du -c -h'
alias mkdir='mkdir -p -v'
alias nano='nano -w'
alias ping='ping -c 5'
alias up='cd ..'
alias u='up'
alias uu='cd ../..'
alias uuu='cd ../../..'
alias uuuu='cd ../../../..'
# new commands
alias da='date "+%A, %B %d, %Y [%T]"'
alias du1='du --max-depth=1'
alias hist='history | grep $1' # requires an argument
alias psg='ps -Af | grep $1' # requires an argument
alias fhn='find . -iname'
alias g='git status'
# Sudo commands
alias svim='sudo vim'
# Git aliases
alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias gco='git checkout '
alias gk='gitk --all&'
alias gx='gitx --all'
alias got='git '
alias get='git '
alias tl='tmux ls'
alias ta='tmux attach -t'
alias tn='tmux new-session -s'
# alias pytags='ctags --languages=python --fields=+l --python-kinds=-iv -R .'
# alias pytags='ctags --languages=python --fields=+l --python-kinds=-iv -R --exclude=build .'
alias pytags="ctags -R --fields=+l --languages=python --python-kinds=-iv -f ./tags ./ \$(python -c \"import os, sys; print(' '.join('{}'.format(d) for d in sys.path if os.path.isdir(d)))\")"
djvim() {
vim "+cd $1" "+TlistAddFilesRecursive . [^_]*py\|*html\|*css" +TlistOpen
}
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi