Blog » Blog Entry

Rails .html.erb -> .erb

May 6, 2009

You can use this little shell script to rename (svn mv) all your old .html.erb files to just plain old .erb:

for x in `find . -type f -name \*.html.erb`; do
  svn mv $x `echo $x | sed 's/\(.*\.\)html\.erb/\1erb/'`;
done

And then to get Emacs to make them all pretty:

(setq auto-mode-alist (cons '(".erb$" . html-mode) auto-mode-alist))
Tags: emacs, rails, find, sed, svn

« Atheist Zeitgeist /dev/69 »

Add a comment:

Title:

Comment:

Name:

Email:

Website: