ohmyzsh/plugins/ruby/ruby.plugin.zsh
2013-03-20 11:05:58 -03:00

12 lines
360 B
Bash

# TODO: Make this compatible with rvm.
# Run sudo gem on the system ruby, not the active ruby.
alias sgem='sudo gem'
# Find ruby file
alias rfind='find . -name "*.rb" | xargs grep -n'
# Add first line "#encoding: UTF-8" into a file (for Ruby 1.9)
encoding_file = function() {
sed '1i#encoding: UTF-8' $1 > /tmp/new_file.tmp
mv /tmp/new_file.tmp $1
}