add old .aliases

This commit is contained in:
finga 2020-01-13 21:29:12 +01:00
parent 5967399431
commit a3e8239fd6
3 changed files with 92 additions and 5 deletions

View file

@ -2,4 +2,5 @@
!/.gitignore.d
!/.gitignore.d/zsh
!/.zprofile
!/.zshenv
!/.zshrc

View file

@ -38,8 +38,3 @@ fi
if [ -d "$HOME/.cargo/bin" ] ; then
PATH="$HOME/.cargo/bin:$PATH"
fi
# autoloads
if [ -f "$HOME/.autoload" ] ; then
. ~/.aliases
fi

91
.zshenv Normal file
View file

@ -0,0 +1,91 @@
#
# Safety Aliases
#
alias mv='mv -i -v'
alias rm='rm -i -v'
alias cp='cp -i -v'
alias ln='ln -i -v'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
#
# Aliases
#
alias pgrep='pgrep -a'
alias less='less -r'
alias grep='grep --color=always'
alias mkdir='mkdir -p -v'
alias ping='ping -c 10'
alias ls='ls --color=auto -h -l'
alias df='df -h'
alias em='emacsclient -t -a ""'
alias wicd='wicd-curses'
alias dmesg='dmesg -T'
alias head='head -n 50'
alias tail='tail -n 50'
alias cow='cowsay $(fortune)'
alias da='du --max-depth=1 2> /dev/null | sort -n -r | head -n20'
alias gwc='git ls-files | xargs cat | wc'
alias c2pdf='enscript -r -2 --highlight=c --line-numbers -o - $(git ls-files | grep -v .png | grep -v .xcf | grep -v .map) | ps2pdf -'
alias feh='feh -FZ'
alias white='i3lock'
#
# Shortcuts
#
alias la='ls -a'
alias l='la'
alias lsa='la'
alias ..='cd ..'
alias ~='cd ~'
alias a='apropos'
alias p='ping'
alias m='man'
alias s='sudo'
alias d='dirs -v'
# dirs
alias 1='cd -1'
alias 2='cd -2'
alias 3='cd -3'
alias 4='cd -4'
alias 5='cd -5'
alias 6='cd -6'
alias 7='cd -7'
alias 8='cd -8'
alias 9='cd -9'
alias 0='cd -10'
#
# new commands
#
alias jeopardy='mpv ~/.sounds/jeopardy.mp3 &'
alias wttr='curl https://wttr.in/Salzburg'
#
# Developing
#
alias valgrind='valgrind --track-origins=yes --leak-check=full'
#
# colorized man pages
#
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}