-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
77 lines (62 loc) · 1.56 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
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
75
76
77
# .bashrc
if [ -e "${HOME}/.bash_profile" -a "$__BASH_PROPILE_LOADED__" != "1" ]; then
source ${HOME}/.bash_profile
fi
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
#stty -ixon
# unlimit stacksize for large aray in user mode
#ulimit -s unlimited
# set aliases and define function
alias eng='LANG=C LANGUAGE=C LC_ALL=C'
alias grep='\grep --color=auto'
alias hgrep='history | grep'
alias lesss='less -RSFX'
alias ls='\ls --color=auto -F'
alias ll='\ls --color=auto -Flh'
alias la='\ls --color=auto -Flha'
alias lt='\ls --color=auto -Flht'
function lsd(){
\ls --color=always -Fl $@ | \grep '^d'
}
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias cdg='cd $(git rev-parse --show-toplevel)'
function cdl(){
cd $@
ll
}
function mkcd(){
mkdir $@
cd $_
}
#plain vim
alias pvim='vim -u NONE --noplugin -N'
function apt-up(){
sudo apt update
sudo apt -y autoremove
sudo apt upgrade
sudo apt -y autoremove
sudo apt -y autoclean
sudo apt update
}
alias O='xdg-open'
alias df='df -x squashfs'
# user file-creation mask
umask 022
PS1='\n\[\e[0;36m\]\t \[\e[0;32m\]\u\[\e[1;30m\]@\[\e[1;34m\]\h \[\e[1;33m\]\w\[\e[1;32m\]$(__git_ps1)\[\e[0m\]\n\$ '
if [ -f ~/dotfiles/git-completion.bash ]; then
source ~/dotfiles/git-completion.bash
fi
if [ -f ~/dotfiles/git-prompt.sh ]; then
source ~/dotfiles/git-prompt.sh
fi
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
GIT_PS1_SHOWSTASHSTATE=true
GIT_PS1_SHOWUPSTREAM=auto