diff options
author | Alexander Popov <alex.wayfer@gmail.com> | 2021-03-18 00:24:10 +0300 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-28 11:56:15 +0900 |
commit | 2afbe7113aceb5e3e1c63fe2778c875e975bacf3 (patch) | |
tree | 6432d3fcae54eb6480103f23f4df8200452589e1 | |
parent | 908785ef6d4f8503a027f5ba829f8acf394d4eda (diff) |
[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
-rw-r--r-- | misc/rb_optparse.bash | 2 | ||||
-rw-r--r-- | misc/rb_optparse.zsh | 4 | ||||
-rw-r--r-- | 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 - |