summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.zsh/aliases.zsh12
-rw-r--r--.zshrc12
2 files changed, 18 insertions, 6 deletions
diff --git a/.zsh/aliases.zsh b/.zsh/aliases.zsh
index e0403e95..0608a8fb 100644
--- a/.zsh/aliases.zsh
+++ b/.zsh/aliases.zsh
@@ -17,15 +17,17 @@ function tunnel {
 }
 
 alias killlall='killall'
-alias irb='ripl'
+which ripl &> /dev/null && alias irb='ripl'
 alias l='ls'
 alias ll='ls'
 
-alias ls='ls --color=auto'
-alias grep='grep --color=auto'
-alias rm='rm -vI'
+osx || alias ls='ls --color=auto'
+osx || alias grep='grep --color=auto'
+osx || alias rm='rm -vI'
+osx && alias rm='rm -v'
 
-alias gvim='gvim 2> /dev/null'
+osx || alias gvim='gvim 2> /dev/null'
+osx && alias gvim='mvim'
 
 alias b='bundle exec'
 alias .env='export $(cat .env)'
diff --git a/.zshrc b/.zshrc
index 53eea862..7df1921e 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,3 +1,11 @@
+# Detect platform
+if [[ "$(uname)" == "Darwin" ]]; then
+  function osx { true }
+else
+  function osx { false }
+fi
+
+# Basic zsh config
 HISTFILE=~/.histfile
 HISTSIZE=5000
 SAVEHIST=5000
@@ -59,7 +67,9 @@ source ~/.zsh/aliases.zsh
 
 # Environment
 
-EDITOR=vim
+export EDITOR=vim
+osx && PATH=$PATH:~/bin
+osx && export CLICOLOR=1
 
 # Prompt