[zsh] consolidates OS-specific files
This commit is contained in:
parent
4ab2b26363
commit
59912e0236
4 changed files with 35 additions and 38 deletions
2
install
2
install
|
@ -24,7 +24,7 @@ ln -s $DOTFILES/my.cnf $HOME/.my.cnf
|
|||
ln -s $DOTFILES/tmux.conf $HOME/.tmux.conf
|
||||
ln -s $DOTFILES/tmuxinator $HOME/.tmuxinator
|
||||
ln -s $DOTFILES/vim $HOME/.vim
|
||||
ln -s $DOTFILES/zsh/zshrc $HOME/.zshrc
|
||||
ln -s $DOTFILES/zshrc $HOME/.zshrc
|
||||
|
||||
if [[ `uname` == 'Darwin' ]]; then
|
||||
rm -rf $HOME/Library/Application\ Support/Karabiner
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
export GREP_OPTIONS="--color=auto --exclude-dir=${GREP_EXCLUDE_DIR} --exclude-dir=.sass-cache"
|
||||
|
||||
source "`brew --prefix`/etc/grc.bashrc"
|
||||
source $HOME/.rvm/scripts/rvm
|
||||
|
||||
# Requires sudo, saves a step
|
||||
alias mtr="sudo mtr"
|
||||
|
||||
# Because macOS is dumb
|
||||
alias mux="tmuxinator"
|
||||
|
||||
# Unquarantine files on OSX
|
||||
alias unquarantine="xattr -r -d com.apple.quarantine *"
|
||||
|
||||
# Because OS X returns all caps
|
||||
function uuidgen() {
|
||||
env uuidgen "$@" | awk '{print tolower($0)}'
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/zsh
|
||||
|
||||
alias pbcopy='xclip -selection clipboard'
|
||||
alias pbpaste='xclip -selection clipboard -o'
|
||||
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r $HOME/.dircolors && eval "$(dircolors -b $HOME/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls="ls --color=auto"
|
||||
|
||||
GREP_FLAGS=" --color=auto --exclude-dir=${GREP_EXCLUDE_DIR}"
|
||||
|
||||
alias grep="grep ${GREP_FLAGS}"
|
||||
alias egrep="egrep ${GREP_FLAGS}"
|
||||
alias fgrep="fgrep ${GREP_FLAGS}"
|
||||
fi
|
|
@ -3,6 +3,7 @@
|
|||
DOTFILES=$HOME/.dotfiles
|
||||
ADOTDIR=$DOTFILES/vendor/zsh-users/antigen/
|
||||
GREP_EXCLUDE_DIR="{.git,.sass-cache,artwork,node_modules,vendor}"
|
||||
OS=`uname`
|
||||
|
||||
export CLICOLOR=1
|
||||
export EDITOR=vim
|
||||
|
@ -11,9 +12,40 @@ export TERM="xterm-256color"
|
|||
|
||||
bindkey -v
|
||||
|
||||
source $DOTFILES/zsh/`uname`.zshrc
|
||||
source $DOTFILES/vendor/zsh-users/antigen/antigen.zsh
|
||||
if [ $OS = 'Linux' ]; then
|
||||
alias pbcopy='xclip -selection clipboard'
|
||||
alias pbpaste='xclip -selection clipboard -o'
|
||||
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r $HOME/.dircolors && eval "$(dircolors -b $HOME/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls="ls --color=auto"
|
||||
|
||||
GREP_FLAGS=" --color=auto --exclude-dir=${GREP_EXCLUDE_DIR}"
|
||||
|
||||
alias grep="grep ${GREP_FLAGS}"
|
||||
alias egrep="egrep ${GREP_FLAGS}"
|
||||
alias fgrep="fgrep ${GREP_FLAGS}"
|
||||
fi
|
||||
elif [ $OS = 'Darwin' ]; then
|
||||
export GREP_OPTIONS="--color=auto --exclude-dir=${GREP_EXCLUDE_DIR} --exclude-dir=.sass-cache"
|
||||
|
||||
source "`brew --prefix`/etc/grc.bashrc"
|
||||
source $HOME/.rvm/scripts/rvm
|
||||
|
||||
# Requires sudo, saves a step
|
||||
alias mtr="sudo mtr"
|
||||
|
||||
# Because macOS is dumb
|
||||
alias mux="tmuxinator"
|
||||
|
||||
# Unquarantine files on OSX
|
||||
alias unquarantine="xattr -r -d com.apple.quarantine *"
|
||||
|
||||
# Because OS X returns all caps
|
||||
function uuidgen() { env uuidgen "$@" | awk '{print tolower($0)}'; }
|
||||
fi
|
||||
|
||||
source $DOTFILES/vendor/zsh-users/antigen/antigen.zsh
|
||||
antigen-use oh-my-zsh
|
||||
antigen-bundle zsh-users/zsh-completions
|
||||
antigen-bundle zsh-users/zsh-syntax-highlighting
|
Loading…
Add table
Add a link
Reference in a new issue