Adds self updating to zshrc
This commit is contained in:
parent
26180cc0a6
commit
8cdedc542b
1 changed files with 19 additions and 1 deletions
18
zshrc
18
zshrc
|
@ -12,6 +12,17 @@
|
||||||
# Ajout de */sbin au PATH (pour ifconfig en particulier)
|
# Ajout de */sbin au PATH (pour ifconfig en particulier)
|
||||||
export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:~/bin
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:~/bin
|
||||||
|
|
||||||
|
# Check for update
|
||||||
|
cd /home/$USER/rc
|
||||||
|
if $(git status --porcelain -b 2> /dev/null | grep '^## .*behind' &> /dev/null); then
|
||||||
|
echo "Type Y to update .zshrc: \c"
|
||||||
|
read line
|
||||||
|
if [ "$line" = Y ] || [ "$line" = y ]; then
|
||||||
|
git pull --rebase --stat origin master
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
cd $OLDPWD
|
||||||
|
|
||||||
# Configuration for virtualenv
|
# Configuration for virtualenv
|
||||||
export WORKON_HOME=$HOME/.virtualenvs
|
export WORKON_HOME=$HOME/.virtualenvs
|
||||||
source /usr/local/bin/virtualenvwrapper.sh > /dev/null 2>&1
|
source /usr/local/bin/virtualenvwrapper.sh > /dev/null 2>&1
|
||||||
|
@ -46,6 +57,13 @@ alias which='which -a'
|
||||||
alias gg='git log --oneline --abbrev-commit --all --graph --decorate --color'
|
alias gg='git log --oneline --abbrev-commit --all --graph --decorate --color'
|
||||||
# À tester un jour :)
|
# À tester un jour :)
|
||||||
# alias -s ps=gv
|
# alias -s ps=gv
|
||||||
|
# Le fameux cd ...etc
|
||||||
|
alias cd ...=cd ../..
|
||||||
|
alias cd ....=cd ../../..
|
||||||
|
alias cd .....=cd ../../../..
|
||||||
|
alias cd ......=cd ../../../../..
|
||||||
|
alias cd .......=cd ../../../../../..
|
||||||
|
alias cd ........=cd ../../../../../../..
|
||||||
|
|
||||||
# Demande confirmation pour 'rm *' -> ou
|
# Demande confirmation pour 'rm *' -> ou
|
||||||
unsetopt rm_star_silent
|
unsetopt rm_star_silent
|
||||||
|
|
Loading…
Reference in a new issue