From 2afbe7113aceb5e3e1c63fe2778c875e975bacf3 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Thu, 18 Mar 2021 00:24:10 +0300 Subject: [PATCH] [ruby/optparse] Add EditorConfig file More info here: https://editorconfig.org/ For example, `ruby/ruby` has it: https://github.com/ruby/ruby/blob/05ebaee/.editorconfig Also fix some offenses. https://github.com/ruby/optparse/commit/29402e7e0e --- misc/rb_optparse.bash | 2 +- misc/rb_optparse.zsh | 4 ++-- test/optparse/test_acceptable.rb | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/rb_optparse.bash b/misc/rb_optparse.bash index e2d2fdea38..f77d937c87 100644 --- a/misc/rb_optparse.bash +++ b/misc/rb_optparse.bash @@ -17,5 +17,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 9e42eff967..258d4f856c 100644 --- a/misc/rb_optparse.zsh +++ b/misc/rb_optparse.zsh @@ -25,8 +25,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 5c3fbdb10c..12f7886538 100644 --- a/test/optparse/test_acceptable.rb +++ b/test/optparse/test_acceptable.rb @@ -196,4 +196,3 @@ class TestOptionParser::Acceptable < TestOptionParser end end -