Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #189 from caarlos0/speed
Browse files Browse the repository at this point in the history
Speed improvements
  • Loading branch information
caarlos0 committed Apr 10, 2016
2 parents 3289bb0 + 8f1b9c7 commit 7bf2d41
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 65 deletions.
5 changes: 4 additions & 1 deletion antibody/path.zsh
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/zsh
source <(antibody init)
antibody() {
eval "$(command antibody init -)"
antibody "$@"
}
3 changes: 1 addition & 2 deletions golang/path.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
export GOPATH="$PROJECTS/Go"
[ ! -d "$GOPATH" ] && mkdir -p "$GOPATH/bin"
[ ! -d "$GOPATH/src/github.com/" ] && mkdir -p "$GOPATH/src/github.com/"
export PATH="$PATH:$GOPATH/bin"
mkdir -p "$GOPATH/bin" "$GOPATH/src/github.com/"
2 changes: 1 addition & 1 deletion homebrew/aliases.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
if test "$(uname)" = "Darwin"; then
if which brew >/dev/null 2>&1; then
brew() {
case "$1" in
cleanup)
Expand Down
4 changes: 1 addition & 3 deletions node/path.zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/sh
export PATH="/usr/local/share/npm/bin:$PATH"
export PATH="$PATH:$HOME/.npm/bin"

export PATH="$PATH:/usr/local/share/npm/bin:$HOME/.npm/bin"
2 changes: 1 addition & 1 deletion postgres/path.zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
if [ "$(uname -s)" = "Darwin" ]; then
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin"
fi
2 changes: 0 additions & 2 deletions python/install.sh

This file was deleted.

5 changes: 5 additions & 0 deletions python/path.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
pyenv() {
eval "$(command pyenv init -)"
pyenv "$@"
}
11 changes: 7 additions & 4 deletions ruby/path.zsh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/bin/sh
if [ -d "$HOME/.rbenv" ]; then
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$PATH:$HOME/.rbenv/bin"
fi
# shellcheck disable=SC2039
if rbenv &>/dev/null; then
eval "$(rbenv init -)"

if which rbenv >/dev/null 2>&1; then
rbenv() {
eval "$(command rbenv init -)"
rbenv "$@"
}
fi
22 changes: 0 additions & 22 deletions ruby/rbenv.zsh

This file was deleted.

2 changes: 1 addition & 1 deletion script/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/zsh
set -e
set -ex

# Lint files
./build/build.sh
Expand Down
26 changes: 13 additions & 13 deletions system/aliases.zsh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/sh

alias wtf="imgcat ~/.dotfiles/imgs/wtf.gif"

# grc overides for ls
# Made possible through contributions from generous benefactors like
# `brew install coreutils`
alias wtf="imgcat ~/.dotfiles/imgs/wtf.gif"
# shellcheck disable=SC2039
if gls &>/dev/null; then
if which gls >/dev/null 2>&1; then
alias ls="gls -F --color"
alias l="gls -lAh --color"
alias ll="gls -l --color"
Expand All @@ -19,17 +20,16 @@ alias grep="grep --color=auto"
alias duf="du -sh * | sort -hr"
alias less="less -r"

if [ -z "$(command -v pbcopy)" ]; then
if [ -n "$(command -v xclip)" ]; then
alias pbcopy="xclip -selection clipboard"
alias pbpaste="xclip -selection clipboard -o"
elif [ -n "$(command -v xsel)" ]; then
alias pbcopy="xsel --clipboard --input"
alias pbpaste="xsel --clipboard --output"
fi
fi

if [ "$(uname -s)" != "Darwin" ]; then
if [ -z "$(command -v pbcopy)" ]; then
if [ -n "$(command -v xclip)" ]; then
alias pbcopy="xclip -selection clipboard"
alias pbpaste="xclip -selection clipboard -o"
elif [ -n "$(command -v xsel)" ]; then
alias pbcopy="xsel --clipboard --input"
alias pbpaste="xsel --clipboard --output"
fi
fi
if [ -e /usr/bin/xdg-open ]; then
alias open="xdg-open"
fi
Expand Down
2 changes: 0 additions & 2 deletions system/env.zsh

This file was deleted.

3 changes: 1 addition & 2 deletions system/grc.zsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh
# GRC colorizes nifty unix tools all over the place
# shellcheck disable=2039
if grc &>/dev/null && ! brew &>/dev/null; then
if which grc >/dev/null 2>&1 && which brew >/dev/null 2>&1; then
# shellcheck disable=SC1090
. "$(brew --prefix)/etc/grc.bashrc"
fi
3 changes: 1 addition & 2 deletions system/path.zsh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/bin/sh
export PATH="./bin:/usr/local/bin:/usr/local/sbin:$ZSH/bin:$PATH"
export MANPATH="/usr/local/man:/usr/local/mysql/man:/usr/local/git/man:$MANPATH"
export PATH="$PATH:$ZSH/bin"
7 changes: 0 additions & 7 deletions zsh/config.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,3 @@ else
bindkey "^[3;5~" delete-char
bindkey "\e[3~" delete-char
fi

# ignore case
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
# menu if nb items > 2
zstyle ':completion:*' menu select=2
# list of completers to use
zstyle ':completion:*::::' completer _expand _complete _ignored _approximate
3 changes: 1 addition & 2 deletions zsh/prompt.zsh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/zsh
PURE_CMD_MAX_EXEC_TIME=1
PURE_GIT_PULL=0
antibody bundle sindresorhus/pure

# these two guys **MUST** be load last.
# these two guys **MUST** be loaded last.
antibody bundle <<EOF
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search
Expand Down
3 changes: 3 additions & 0 deletions zsh/zshrc.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export ZSH="$HOME/.dotfiles"
# your project folder that we can `c [tab]` to
export PROJECTS="$HOME/Code"

# your default editor
export EDITOR='atom'

# all of our zsh files
typeset -U config_files
config_files=($ZSH/*/*.zsh)
Expand Down

0 comments on commit 7bf2d41

Please sign in to comment.