all: clean up everything

This commit is contained in:
2018-12-06 14:23:33 +01:00
parent c81487fa28
commit 54024171b1
4 changed files with 4 additions and 248 deletions

56
zshrc
View File

@@ -38,8 +38,6 @@ export CARP_DIR=$GH_HOME/carp/Carp/
export EDITOR=/usr/bin/vim
alias dob="git branch --merged | grep -vE '(\*)|(master)|(dev)' | xargs -n 1 git branch -d"
alias vi="stty stop '' -ixoff ; stty erase '^?'; vim"
#alias gcc="gcc-8"
#alias g++="g++-8"
alias mk="make"
alias g="git"
alias virtualenv2="python2.7 /usr/local/lib/python2.7/site-packages/virtualenv.py"
@@ -58,7 +56,6 @@ alias cdgo="cd ~/.go/src"
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
alias loc="cloc --read-lang-def=/Users/veitheller/.scripts/cloc.txt *"
alias ls="ls -a"
alias quit="exit"
alias pbclear="echo -n '' | pbcopy"
PROMPT="%{$fg[red]%}%n%{$fg[white]%} at %{$fg[green]%}%m%{$fg[white]%}"$'\n'"=> "
@@ -73,12 +70,6 @@ bindkey "Î" expand-or-complete-with-dots
precmd () {print -Pn "\e]2; %~/ \a"}
preexec () {print -Pn "\e]2; %~/ \a"}
insert_sudo () {
zle beginning-of-line; zle -U "sudo "
}
zle -N insert-sudo insert_sudo
bindkey "^[s" insert-sudo
case $TERM in
xterm*)
precmd(){print -Pn "\e]0;%m: %~\a"}
@@ -119,41 +110,6 @@ function rprompt-git-current-branch {
RPROMPT='`rprompt-git-current-branch`'
RPROMPT+="%{$fg[white]%}in %{$fg[yellow]%}%~%{$reset_color%}"
extract(){
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.tar.xz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) if [ -n $2 ] ; then
unzip $1 -d $2
else
unzip $1
fi;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
mcd(){
mkdir -p $1
cd $1
}
pinfo(){
top -pid `pgrep $1 | tr "\\n" "," | sed 's/,$//' | sed -e's/,/ -pid /g'`
}
save_dotfiles(){
local DOTPATH=~/Documents/Code/Github/.dotfiles/
cp -r ~/.scripts ${DOTPATH}
@@ -183,18 +139,6 @@ massif() {
valgrind --tool=massif --massif-out-file=massif.prof $1 && ms_print massif.prof | less
}
upgrade() {
if [ -x /usr/local/bin/brew ] ; then
brew update
brew upgrade --all
brew cleanup
fi
}
function tree(){
find . | sed -e 's/[^\/]*\//|--/g' -e 's/-- |/ |/g' | $PAGER
}
###-begin-npm-completion-###
#
# npm command completion script