ohmyzsh/lib/aliases.zsh
Gaetan Semet 92ed38cb85 Merge remote-tracking branch 'cadusk/master'
Conflicts:
	lib/aliases.zsh
	templates/zshrc-linux.zsh
	templates/zshrc-mac.zsh
	tools/install.sh
2014-03-24 11:56:16 +01:00

61 lines
1.3 KiB
Bash

# Push and pop directories on directory stack
alias pu='pushd'
alias po='popd'
# Basic directory operations
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias -- -='cd -'
alias cd..='cd ..'
alias cd...='cd ../..'
alias cd....='cd ../../..'
alias cd.....='cd ../../../..'
# Super user
alias sudo='sudo ' # This allow 'sudo ll'. See http://www.shellperson.net/using-sudo-with-an-alias/
alias _='sudo'
alias please='sudo'
#alias g='grep -in'
# Show history
if [ "$HIST_STAMPS" = "mm/dd/yyyy" ]
then
alias history='fc -fl 1'
elif [ "$HIST_STAMPS" = "dd.mm.yyyy" ]
then
alias history='fc -El 1'
elif [ "$HIST_STAMPS" = "yyyy-mm-dd" ]
then
alias history='fc -il 1'
else
alias history='fc -l 1'
fi
alias afind='ack-grep -il'
# Enable ls colors
LS_OPTIONS='-hF'
if [ "$DISABLE_LS_COLORS" != "true" ]
then
# Find the option for using colors in ls, depending on the version: Linux or BSD
ls --color -d . &>/dev/null 2>&1 && alias ls="ls --color=tty $LS_OPTIONS" || alias ls="ls -G $LS_OPTIONS"
fi
# List direcory contents
alias lsa='ls -lah'
alias l='ls -lah'
alias ll='ls -lh'
alias la='ls -lAh'
alias sl=ls # often screw this up
alias gita='git add -A'
alias gitl='git l'
alias gitw='git who'
alias gitt='git tags'
# Aliases
alias ta='tmux attach -t'
alias tl='tmux list-session'
alias ts='tmux new-session'