Skip to content

Commit

Permalink
zsh bankruptcy
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Oct 3, 2014
1 parent e35f676 commit 85d3d02
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 8 deletions.
6 changes: 0 additions & 6 deletions zsh/.zlogin
Expand Up @@ -14,9 +14,3 @@
fi
} &!

# Print a random, hopefully interesting, adage.
if (( $+commands[fortune] )); then
fortune -a
print
fi

7 changes: 7 additions & 0 deletions zsh/.zshenv
Expand Up @@ -25,6 +25,11 @@ export TERMINFO="$HOME/.terminfo"
export MOSH_TITLE_NOPREFIX=1
export MPD_HOST="$HOME/.mpd/socket"

export TZ=America/Vancouver

export NPM_PACKAGES="$HOME/.npm-packages"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"

#
# Language
#
Expand Down Expand Up @@ -81,6 +86,8 @@ unset path_file
# Set the list of directories that Zsh searches for programs.
path=(
$HOME/bin
$HOME/go/bin
$NPM_PACKAGES/bin
/usr/local/{bin,sbin}
/usr/{bin,sbin}
/{bin,sbin}
Expand Down
33 changes: 31 additions & 2 deletions zsh/.zshrc
Expand Up @@ -11,8 +11,8 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
fi

# Customize to your needs...
#unalias rm
#unalias mv
unalias rm
unalias mv

alias mplayer=mpv
alias mmv='noglob zmv -W'
Expand All @@ -24,6 +24,21 @@ alias json="python -mjson.tool"
alias xml="xmllint --format -"
alias git="hub"
compdef hub=git
alias b="git branch | cut -c 3- | fzy | xargs git checkout"

v(){
if [[ -z $1 ]]; then
vim $(ag -l -g '' | fzy)
else
vim $*
fi
}
compdef v=vim

alias f="ag --nocolor -l -g ''"

tmrun() { tmux split-window -c `pwd` -l 10 "zsh -ic \"$@;read\"" && tmux last-pane }
tmgem() { tmux new-window -c `bundle show $1` -n "$1" }

# As of nokogiri 1.6, it will compile its own version of libxml2 and libxslt.
# While this is convenient, it is slower, and uses about 100MB for each
Expand All @@ -45,10 +60,24 @@ PS1='
%F{135}%n%f@%F{166}%m%f:%F{118}%~%f ${vcs_info_msg_0_} [${RUBY_ENGINE} ${RUBY_VERSION}]
$ '

export GOPATH=~/go

source $HOME/.local/share/chruby/chruby.sh
source $HOME/.local/share/chruby/auto.sh
source $HOME/.local/share/bundler-exec/bundler-exec.sh

# Read ~/.ruby-version to determine version
chruby_auto


unsetopt flowcontrol
function insert-selecta-path-in-command-line() {
local selected_path
echo
selected_path=$(ag . -l -g '' | fzy) || return
eval 'LBUFFER="$LBUFFER$selected_path"'
zle reset-prompt
}
zle -N insert-selecta-path-in-command-line
bindkey "^S" "insert-selecta-path-in-command-line"

0 comments on commit 85d3d02

Please sign in to comment.