diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9009c0a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 80 + +[*.zsh] +indent_size = 4 diff --git a/README.md b/README.md index bfd9a4a..67d829f 100644 --- a/README.md +++ b/README.md @@ -57,4 +57,3 @@ To install this gem onto your local machine, run `bundle exec rake install`. To ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/optparse. - diff --git a/misc/rb_optparse.bash b/misc/rb_optparse.bash index 8a59ec2..eece08d 100644 --- a/misc/rb_optparse.bash +++ b/misc/rb_optparse.bash @@ -16,5 +16,5 @@ _rb_optparse() { } rb_optparse () { - [ $# = 0 ] || complete -o default -F _rb_optparse "$@" + [ $# = 0 ] || complete -o default -F _rb_optparse "$@" } diff --git a/misc/rb_optparse.zsh b/misc/rb_optparse.zsh index a08b3dd..90e1128 100755 --- a/misc/rb_optparse.zsh +++ b/misc/rb_optparse.zsh @@ -24,8 +24,8 @@ generate-complete-function/ruby/optparse () mkdir -p "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}" $1 "--*-completion-zsh=${1:t}" >! "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}/$cmpl" if [[ $(type -w "$cmpl") == "${cmpl}: function" ]]; then - unfunction "$cmpl" - autoload -U "$cmpl" + unfunction "$cmpl" + autoload -U "$cmpl" else compinit "$cmpl" fi diff --git a/test/optparse/test_acceptable.rb b/test/optparse/test_acceptable.rb index 5c3fbdb..12f7886 100644 --- a/test/optparse/test_acceptable.rb +++ b/test/optparse/test_acceptable.rb @@ -196,4 +196,3 @@ def test_decimal_numeric end end -