Skip to content

Instantly share code, notes, and snippets.

@robdimarco
Created April 5, 2012 15:35
Show Gist options
  • Save robdimarco/2311998 to your computer and use it in GitHub Desktop.
Save robdimarco/2311998 to your computer and use it in GitHub Desktop.
Rails log viewer zsh alias from @tubbo
RAILS_PAGER='less'
rl() {
if [[ $RAILS_PAGER == "less" ]] ; then
MODES="-R"
else
MODES="-f"
fi
if [[ $RAILS_ENV != "" ]] ; then
$RAILS_PAGER $MODES log/$RAILS_ENV.log;
elif [[ $1 != "" ]] ; then
$RAILS_PAGER $MODES log/$1.log;
else
$RAILS_PAGER $MODES log/development.log;
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment