Navigation Menu

Skip to content

Commit

Permalink
[bash] Silence error output if programs are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmm5t committed Jan 23, 2011
1 parent 98422eb commit 2c388c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bash_aliases
Expand Up @@ -49,7 +49,7 @@ alias gsr="git svn rebase"
alias gsp="git svn dcommit"
alias gsu="git submodule update --init --recursive"
alias gi="git config branch.master.remote 'origin'; git config branch.master.merge 'refs/heads/master'"
if [ `which hub` ]; then
if [ `which hub 2> /dev/null` ]; then
alias git="hub"
fi

Expand Down
4 changes: 2 additions & 2 deletions bashrc
Expand Up @@ -90,7 +90,7 @@ function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\(\1$(parse_git_dirty)\)/"
}

if [ `which git` ]; then
if [ `which git 2> /dev/null` ]; then
function git_prompt {
parse_git_branch
}
Expand All @@ -100,7 +100,7 @@ else
}
fi

if [ `which rvm-prompt` ]; then
if [ `which rvm-prompt 2> /dev/null` ]; then
function rvm_prompt {
echo "($(rvm-prompt v g))"
}
Expand Down

0 comments on commit 2c388c4

Please sign in to comment.