2016-03-31 02:03:55 +00:00
|
|
|
# Common Aliases
|
2016-04-23 12:18:13 +00:00
|
|
|
alias -g ...=../..
|
|
|
|
alias -g ....=../../..
|
|
|
|
alias -g .....=../../../..
|
|
|
|
alias -g ......=../../../../..
|
2016-03-31 02:03:55 +00:00
|
|
|
|
|
|
|
alias ..la="cd ..;la"
|
|
|
|
alias ..ll="cd..;ll"
|
|
|
|
alias ..l="..ll"
|
|
|
|
|
|
|
|
alias l=ll
|
|
|
|
alias ll="ls -lFh"
|
|
|
|
alias la="ls -lAFh"
|
2016-05-01 13:29:03 +00:00
|
|
|
alias lat='la -t'
|
2016-04-01 12:55:26 +00:00
|
|
|
alias al=la # No, I don't need the Mono Assembly Linker
|
2016-03-31 02:03:55 +00:00
|
|
|
|
|
|
|
alias md="mkdir -p"
|
|
|
|
mcd(){
|
|
|
|
mkdir $1 && cd $1
|
|
|
|
}
|
2016-03-31 18:21:23 +00:00
|
|
|
alias grep='grep --color'
|
|
|
|
alias -g H='| head'
|
|
|
|
alias -g T='| tail'
|
|
|
|
alias -g G='| grep'
|
|
|
|
alias -g L="| less"
|
2016-04-01 16:54:28 +00:00
|
|
|
alias -g C="| wc -l"
|
2016-04-02 17:25:04 +00:00
|
|
|
alias -g S="| sort"
|
2016-04-01 16:54:28 +00:00
|
|
|
alias -g count="| wc -l"
|
2016-03-31 18:21:23 +00:00
|
|
|
alias -g NE="2> /dev/null"
|
2016-04-16 17:00:03 +00:00
|
|
|
alias -g NUL="&> /dev/null"
|
|
|
|
alias -g BG="&;disown"
|
2016-04-23 12:18:54 +00:00
|
|
|
alias -g COL="| column -t"
|
2016-05-10 16:05:52 +00:00
|
|
|
alias -g clip="| xclip -i -selection primary -f | xclip -i -selection clipboard"
|
2016-04-30 13:18:38 +00:00
|
|
|
calc() {
|
|
|
|
echo "$@" | bc -l
|
|
|
|
}
|
2016-03-31 02:03:55 +00:00
|
|
|
|
|
|
|
alias svi=sudoedit
|
2016-04-23 12:18:54 +00:00
|
|
|
# This will enable us to use aliases in sudo.
|
|
|
|
# (If alias finishes with a space or tab, the shell will check if the next command is also aliased.)
|
|
|
|
# Source: https://github.com/mayah/home/blob/master/.zsh/zshrc.d/alias.zsh
|
|
|
|
alias sudo='sudo '
|
2016-04-30 13:18:38 +00:00
|
|
|
alias open=xdg-open
|
2016-03-31 02:03:55 +00:00
|
|
|
|
2016-04-30 13:18:38 +00:00
|
|
|
# Command rewrites
|
2016-05-01 13:29:37 +00:00
|
|
|
alias ls='ls --color=always'
|
2016-03-31 18:21:23 +00:00
|
|
|
alias rm='rm -i'
|
|
|
|
alias mv='mv -i'
|
2016-04-16 16:59:33 +00:00
|
|
|
alias cp='cp -i'
|
2016-05-01 13:28:39 +00:00
|
|
|
alias less='less -R'
|
2016-04-30 13:18:38 +00:00
|
|
|
alias tree='tree -C'
|
2016-03-31 18:21:23 +00:00
|
|
|
|
2016-04-01 12:37:15 +00:00
|
|
|
# System aliases
|
2016-04-30 13:06:55 +00:00
|
|
|
alias s=systemctl
|
2016-05-21 11:50:55 +00:00
|
|
|
alias p=pacaur
|
2016-04-01 12:37:15 +00:00
|
|
|
alias ps='ps aux'
|
2016-03-31 18:21:23 +00:00
|
|
|
|
|
|
|
# File default aliases
|
2016-05-01 13:32:37 +00:00
|
|
|
pdf() {
|
|
|
|
evince $@ NE BG
|
|
|
|
}
|
|
|
|
alias -s pdf=pdf
|
2016-03-31 18:21:23 +00:00
|
|
|
alias -s zip="unzip -l"
|
|
|
|
alias -s rar="unrar l"
|
|
|
|
alias -s tar="tar tf"
|
2016-04-16 17:00:03 +00:00
|
|
|
alias -s tar.gz=echo
|
|
|
|
alias -s jar="java -jar"
|
2016-04-23 12:18:54 +00:00
|
|
|
alias -s git="git clone"
|
2016-03-31 18:21:23 +00:00
|
|
|
|
|
|
|
|
2016-03-31 02:03:55 +00:00
|
|
|
# Git Aliases
|
|
|
|
alias g=git
|
|
|
|
alias gcl="git clone --recursive"
|
|
|
|
alias gco="git checkout"
|
2016-04-18 13:06:14 +00:00
|
|
|
alias gcom="git checkout master"
|
2016-03-31 02:03:55 +00:00
|
|
|
alias ga="git add"
|
|
|
|
alias gaa="ga -A"
|
|
|
|
alias gc="git commit"
|
|
|
|
alias gcm="gc -m"
|
2016-05-15 22:52:11 +00:00
|
|
|
alias gcam="gc -a -m "
|
2016-03-31 02:03:55 +00:00
|
|
|
alias gst="git status"
|
|
|
|
|
|
|
|
alias gm="git merge"
|
|
|
|
alias gma="git merge --abort"
|
|
|
|
alias grb="git rebase"
|
|
|
|
alias grba="grb --abort"
|
|
|
|
alias grbc="grb --continue"
|
|
|
|
|
|
|
|
alias gf="git fetch"
|
|
|
|
alias gp="git push"
|
|
|
|
alias gpf="gp --force"
|
|
|
|
alias gl="git pull --rebase"
|
|
|
|
alias gd="git diff"
|
2016-04-16 17:00:03 +00:00
|
|
|
alias gds="git diff --staged"
|
2016-03-31 02:03:55 +00:00
|
|
|
alias glg="git log --stat --color"
|
|
|
|
alias glog="git log --oneline --decorate --color --graph"
|
|
|
|
|
2016-04-18 13:06:14 +00:00
|
|
|
alias grst="git reset"
|
|
|
|
alias gundo="git reset @~1"
|
2016-03-31 02:03:55 +00:00
|
|
|
alias gclean="git clean"
|
|
|
|
alias gbr="git branch"
|
|
|
|
alias gr="git remote"
|
|
|
|
alias gra="gr add"
|
|
|
|
alias grr="gr rm"
|
|
|
|
alias grao="gra origin"
|
|
|
|
alias grro="grr origin"
|
|
|
|
|
|
|
|
alias gsta='git stash'
|
|
|
|
alias gstd='gsta drop'
|
|
|
|
alias gstl='gsta list'
|
|
|
|
alias gstp='gsta pop'
|
|
|
|
alias gstv="gsta show -p stash@{0}"
|
|
|
|
|
|
|
|
|
|
|
|
# General Aliases
|
2016-05-10 16:06:06 +00:00
|
|
|
alias ssha='eval `ssh-agent` ; ssh-add'
|
2016-03-31 02:03:55 +00:00
|
|
|
alias aliases="$EDITOR $DOTFILES/aliases ; source ~/.zshrc"
|
|
|
|
alias vimrc="$EDITOR ~/.vimrc"
|
|
|
|
alias zshrc="$EDITOR ~/.zshrc ; source ~/.zshrc"
|
|
|
|
alias xinitrc="$EDITOR ~/.xinitrc"
|
|
|
|
alias xresources="$EDITOR ~/.Xresources ; xrdb merge ~/.Xresources"
|
2016-04-17 14:27:20 +00:00
|
|
|
alias xsession="$EDITOR ~/.xsession"
|
2016-03-31 02:03:55 +00:00
|
|
|
alias sshc="$EDITOR ~/.ssh/config"
|
|
|
|
alias dotfiles="cd $DOTFILES"
|
|
|
|
alias i3c="$EDITOR ~/.config/i3/config ; i3-msg restart"
|
2016-05-01 13:09:45 +00:00
|
|
|
alias i3bc="$EDITOR ~/.config/i3/blocks/config ; i3-msg restart"
|
2016-03-31 02:03:55 +00:00
|
|
|
alias sf=screenfetch
|
2016-04-02 17:29:23 +00:00
|
|
|
alias nf=neofetch
|
2016-03-31 02:03:55 +00:00
|
|
|
|
|
|
|
alias lab="ssh -tt tw '~/ctl' 2>/dev/null"
|
2016-04-30 13:08:36 +00:00
|
|
|
alias -g downloads="~/downloads"
|
|
|
|
alias -g dl="downloads"
|
|
|
|
alias -g doc="~/documents"
|
|
|
|
alias -g desktop="cd ~/desktop"
|
|
|
|
alias -g uni="~/university"
|
|
|
|
alias -g drive="~/drive"
|