mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Added encoding_file function for ruby plugin
This commit is contained in:
parent
dea2b49bd0
commit
03d199c412
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue