Return to Snippet

Revision: 67028
at July 30, 2014 22:51 by Epigene


Initial Code
alias go!="kill (cat PROJECT_HOME/tmp/pids/server.pid); cd PROJECT_HOME; rails s"

OR (a bit more versatile and dangerous; will kill ALL rails processes, beware)

alias go!="kill (ps auxw | grep "ruby.*rails" | grep -v "grep" | awk '{print $2}'); cd PROJECT_HOME; rails s"

Initial URL
http://stackoverflow.com/questions/2762994/how-to-define-an-alias-in-fish-shell

Initial Description
Aliases command "go!" to starting AND restarting rails server for a project from anywhere in the filesystem. Replace PROJECT_HOME with the path to your project.

Place in config.fish

Initial Title
Fish alias for restarting Rails server

Initial Tags
rails

Initial Language
Bash