Skip to content

Commit

Permalink
Added encoding_file function for ruby plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tinogomes committed Aug 6, 2015
1 parent cd3769e commit b0c5400
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/ruby/ruby.plugin.zsh
Expand Up @@ -4,3 +4,9 @@ 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
}

0 comments on commit b0c5400

Please sign in to comment.