From f42cfc42ee6187ad871035f91bd70b97fdcd9d9c Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Tue, 29 Sep 2015 16:30:27 -0700 Subject: [PATCH] ZSH changes --- dotfiles/spacemacs | 3 ++- dotfiles/zshrc | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dotfiles/spacemacs b/dotfiles/spacemacs index aa16d15..a760695 100644 --- a/dotfiles/spacemacs +++ b/dotfiles/spacemacs @@ -198,13 +198,14 @@ values." "Initialization function for user code. It is called immediately after `dotspacemacs/init'. You are free to put any user code." - + ) (defun dotspacemacs/user-config () "Configuration function for user code. This function is called at the very end of Spacemacs initialization after layers configuration. You are free to put any user code." + (global-linum-mode) ) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 41428ef..589d239 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -5,13 +5,31 @@ export LANG=en_US.UTF-8 export VISUAL=vim export EDITOR="$VISUAL" export TERM=xterm-256color +export ITERM_24BIT=1 alias irssi='TERM=screen-256color irssi' +# This is for the mac GUI version of emacs. +alias emacs-gui='open -a /Applications/Emacs.app $1' + parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } +function npm_chpwd_hook() { + NPMPATH="$(npm bin)" + + if [ -d "$NPMPATH" ]; then + PATH=$NPMPATH:$PRENPMPATH + else + PATH=$PRENPMPATH + fi + + export PATH=$PATH +} + +export PRENPMPATH=$PATH +npm_chpwd_hook HISTFILE=~/.histfile HISTSIZE=10000 SAVEHIST=10000 @@ -56,3 +74,5 @@ RPROMPT="%{$fg[white]%}\${vcs_info_msg_0_}%{$reset_color%}" PROMPT="%{$fg[white]%}┌%{$reset_color%}[%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}]─[%{$fg[green]%}%d%{$reset_color%}] %{$fg[white]%}└─╼%{$reset_color%} " + +npm_chpwd_hook \ No newline at end of file