Skip to content

Commit

Permalink
create ri function, poor man's pgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
sshaw committed Apr 1, 2013
1 parent 5996929 commit eda3baf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ alias pinstall='pbuild && make install'
alias pb='perlbrew'
alias pd='perldoc'

type -t pgrep > /dev/null || alias pgrep='ps ax | grep -v grep | egrep'
alias ll=' ls -lh'
alias fxml='xmllint --format'
alias vxsd='xmllint --noout --schema'
Expand Down Expand Up @@ -140,6 +141,23 @@ rake()
fi
}

# Use RDoc server over `ri`
ri()
{
if [ -z "$1" ]; then
command ri
return
fi

# TODO: try to use whatever browser is currently open
url="http://localhost:8808/rdoc?q=$*"
if [ $(uname -s) == "Darwin" ]; then
open -a Opera "$url"
else
opera "$url" &
fi
}

# rm empty directories
# usage: rmedir DIR [OPTIONS]
rmedir()
Expand Down

0 comments on commit eda3baf

Please sign in to comment.