Clean up aliases

This commit is contained in:
Henrik Lissner 2014-03-17 17:25:17 -04:00
parent 18333f734d
commit 44358c5dac

View file

@ -1,3 +1,4 @@
# GIT
if command_exists 'git'; then
# On top of oh-my-zsh's git aliases
@ -60,20 +61,11 @@ if is_linux; then
# iptables
alias ipt='sudo iptables'
function v {
if [ $# -eq 0 ]; then
vim .
else
vim "$@"
fi
}
elif is_mac; then
alias ls='ls -G'
alias b='brew'
alias brewp='cd `brew --prefix`'
alias ql='quicklook'
function o {
@ -84,33 +76,14 @@ elif is_mac; then
fi
}
function v {
if [ $# -eq 0 ]; then
mvim .
else
mvim "$@"
fi
}
fi
alias v="vim"
# Make a directory and change to it
function mkd {
mkdir "$@" && cd "$@"
}
# Meant for string search-and-replace via stdin
function repl {
sed $3 -e "s/${1/\//\\\/}/${2/\//\\\/}/g"
}
if command_exists "ag"; then
# Project-wide search 'n replace using the_silver_searcher:
# https://github.com/ggreer/the_silver_searcher
function agr {
ag -l "$1" | xargs sed -i -e "s/${1/\//\\\/}/${2/\//\\\/}/g"
ag "$2"
}
fi
# vim:set ft=zsh: