Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Small tweaks pulled from holman/dotfiles

  • Loading branch information...
commit 35d458532077afaae1e6318694c7892fb93868aa 1 parent 198a122
@dflems authored
Showing with 7 additions and 9 deletions.
  1. +1 −1  git/aliases.zsh
  2. +1 −3 script/homebrew
  3. +5 −5 zsh/prompt.zsh
View
2  git/aliases.zsh
@@ -1,7 +1,7 @@
# Use `hub` as our git wrapper:
# http://defunkt.github.com/hub/
hub_path=$(which hub)
-if [[ -f $hub_path ]]
+if (( $+commands[hub] ))
then
alias git=$hub_path
fi
View
4 script/homebrew
@@ -11,9 +11,7 @@ then
echo " x You should probably install Homebrew first:"
echo " https://github.com/mxcl/homebrew/wiki/installation"
exit
-else
- echo " + Homebrew found."
fi
-# Install grc, coreutils, and z.sh
+# Install homebrew packages
brew install grc coreutils z
View
10 zsh/prompt.zsh
@@ -41,11 +41,11 @@ need_push () {
}
rb_prompt(){
- if $(which rbenv &> /dev/null)
+ if (( $+commands[rbenv] ))
then
- echo "%{$fg_bold[yellow]%}$(rbenv version | awk '{print $1}')%{$reset_color%}"
- else
- echo ""
+ echo "%{$fg_bold[yellow]%}$(rbenv version | awk '{print $1}')%{$reset_color%}"
+ else
+ echo ""
fi
}
@@ -53,7 +53,7 @@ rb_prompt(){
# command line. I filter it to only count those tagged as "+next", so it's more
# of a motivation to clear out the list.
todo(){
- if $(which todo.sh &> /dev/null)
+ if (( $+commands[todo.sh] ))
then
num=$(echo $(todo.sh ls +next | wc -l))
let todos=num-2
Please sign in to comment.
Something went wrong with that request. Please try again.