From f1dfd720b9d56670ca4db5434e302429bf730f2b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Mar 2013 04:29:56 -0400 Subject: [PATCH] Reorganized into mac/linux aliases --- zsh/aliases | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index c0ba51b0..c8772ab3 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -13,29 +13,6 @@ alias mkdir='mkdir -pv' # Resume download if possible alias wget='wget -c' -# Safety nets -alias mv='mv -i' -alias cp='cp -i' -alias ln='ln -i' -# do not delete / or prompt if deleting more than 3 files at a time # -alias rm='rm -I --preserve-root' - -alias chown='chown --preserve-root' -alias chmod='chmod --preserve-root' -alias chgrp='chgrp --preserve-root' - -# vim -if [[ -n $SSH_CLIENT ]]; then - alias v='vim' -else - alias v='mvim' -fi - -# iptables -if command_exists iptables; then - alias ipt='sudo iptables' -fi - alias rb='ruby' alias py='python' alias js='node' @@ -75,8 +52,30 @@ alias header='curl -I' # directory shortcuts alias dot='cd ~/.dotfiles' -if command_exists "brew"; then + +if is_linux; then + # Safety nets + alias mv='mv -i' + alias cp='cp -i' + alias ln='ln -i' + # do not delete / or prompt if deleting more than 3 files at a time # + alias rm='rm -I --preserve-root' + + alias chown='chown --preserve-root' + alias chmod='chmod --preserve-root' + alias chgrp='chgrp --preserve-root' + + # iptables + alias ipt='sudo iptables' +elif is_mac; then alias brewp='cd `brew --prefix`' fi +# vim +if command_exists mvim && [[ ! -n $SSH_CLIENT ]]; then + alias v='mvim' +else + alias v='vim' +fi + # vim:set ft=zsh: