Skip to main content

zsh: current .alias

This file has all aliases.

~/.dotfiles/.alias
With this it is possible to switch to bash and take all aliases with me.
# all ALIAS is HERE in ~/.aliase
# excepts 'global' ones
# divers
alias zshr='source $HOME/.zshrc'
alias afk="open -a ScreenSaverEngine" # start screen saver and look screen
alias atom='open -a atom' # open atom with given file
alias -g A=" | cmdtoatomfile" # pipe stdout to tmpfile and open in atom
alias backupwww='$HOME/Documents/GitHub/www-backup/start-backup.sh' # s.cc to nas
alias -g C=" | copy" # pipe to clipboard and echo
alias caldiff='now=`strftime %s`; date=`zenity --calendar --date-format='%s'`; sec=`expr $date - $now`; printf "%.0f" $(echo "scale= 2; $sec / 86400 + 1" | bc); echo " day(s)"' # displays calendar and calculates days from now to selected day
alias copy='pbcopy; pbpaste' # to clipboard and echo
alias desktophide="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias desktopshow="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
alias fk=fuck
alias func='compgen -A function G -v -e "^_" | sort' # list all funcs
alias -g G=' | grep -i' # -g means not begin but anywhere else to expand
alias -g GN=' | grep -iv' # grep, -i case insensitive, -v inverted search (NOT)
alias internet='lsof -P -i -n | cut -f 1 -d " " | uniq | grep -v COMMAND | sort' # shows the list of apps currently using internet
alias myip='myip0; myip4; myip6; echo "" | pbcopy'
alias myip0='ipconfig getifaddr en0'
alias myip4='url=`curl -s https://simpel.cc/getip.php`; echo $url | pbcopy; echo $url'
alias myip6='url=`curl -s https://canhazip.com`; echo $url | pbcopy; echo $url'
alias now="ncal -w -B 3 -A 4" # show calendar 3 month before, 4 after, weeknumber
alias path='echo -e ${PATH//:/\\n}' # Print each PATH entry on a separate line
alias screencheat='open -a "Google Chrome" https://simpel.cc/cheat/screen.html' # open cheat sheet vim navigation
#alias server='$HOME/.scripts/dirserver' # start local html server in dir (30sec)
#alias stop="pkill -o -f 'SCREEN -m -d python -m SimpleHTTPServer 8888'" # kill temp web server started by 'dirserver.sh'
alias server="http-server" # faster variant to start html server in current dir
alias serverphp="php -S localhost:8080 -t ." # start local php server in dir
alias vimnavcheat='open -a "Google Chrome" https://simpel.cc/cheat/vimnav.html' # open cheat sheet vim navigation
alias vimkeyscheat='open -a "Google Chrome" https://simpel.cc/cheat/vimkeys.html' # open cheat sheet vim keys
alias wav='audiowaveform' # ~/Downloads/audiowaveform: wav to waveform as png
alias week='date +%V' # show current week number

# files
alias allow="xattr -d com.apple.quarantine" # add app-path to allow this app
alias cd..="cd .."
alias cdd="cd $HOME/Downloads/"
alias cddot="cd $HOME/.dotfiles/"
alias cdg="cd $HOME/Documents/GitHub/"
alias cdis="cd $HOME/Sites/is/"
alias dir='dirs -v' # shows dir stack with numbers
alias ll='exa -l'
alias 'du!'='du -sh' # calcs size of given folder as summary - default ./
alias symshow='ls -lah . | grep "\->"' # show all symlinks in current directory
alias tre="tree -aC --du -p -h -I '.git|.DS_Store'" # show files/folder as tree w/ disk usage

# git
alias gb='git branch'
alias gap='git add -p'
alias gc='git commit -v'
alias 'gc!'='git commit -v --amend'
alias gcd='git checkout dev'
alias gd='git diff'
alias glb='git log --oneline master..' # git log branch only
alias gll='git log --oneline --graph --all'
alias glll='git log --pretty=format:"%C(yellow)%h %Creset%ad %Cgreen%aN %Cred%d %Creset%s" --date=short --graph --all' # git log w/ date + commiter
alias gr='git reflog'
alias gs='git status'
alias gu='git-unreleased'