Bug #4124

optparse: needless argument: --help=zshcomplete=COMMAND

Added by Kazuhiro NISHIYAMA over 3 years ago. Updated almost 3 years ago.

[ruby-dev:42690]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:lib
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2010-12-05 trunk 30086) [x86_64-linux] Backport:

Description

=begin
opttest.rb のようにデフォルト以外の --help があると補完の生成がうまくいかないようです。

% generate-complete-function/ruby/optparse sample/optparse/opttest.rb
opttest: needless argument: --help=zshcomplete=opttest.rb
%
=end

History

#1 Updated by Nobuyoshi Nakada over 3 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r30098.
Kazuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

#2 Updated by Kazuhiro NISHIYAMA over 3 years ago

  • Status changed from Closed to Assigned

=begin
opttest.rb の変更で閉じるということは rspec などのようにすでに独自の --help があるものは非対応のままということでしょうか?

% ruby-trunk -v
ruby 1.9.3dev (2010-12-07 trunk 30107) [i686-linux]
% generate-complete-function/ruby/optparse rspec-trunk
/home/kazu/opt/ruby-trunk/lib/ruby/gems/1.9.1/gems/rspec-core-2.2.1/lib/rspec/core/optionparser.rb:18:in parse!': needless argument: --help=zshcomplete=rspec-trunk (OptionParser::NeedlessArgument)
from /home/kazu/opt/ruby-trunk/lib/ruby/gems/1.9.1/gems/rspec-core-2.2.1/lib/rspec/core/option_parser.rb:4:in
parse!'
from /home/kazu/opt/ruby-trunk/lib/ruby/gems/1.9.1/gems/rspec-core-2.2.1/lib/rspec/core/configuration
options.rb:65:in parse_command_line_options'
from /home/kazu/opt/ruby-trunk/lib/ruby/gems/1.9.1/gems/rspec-core-2.2.1/lib/rspec/core/configuration_options.rb:47:in
parse_options'
from /home/kazu/opt/ruby-trunk/lib/ruby/gems/1.9.1/gems/rspec-core-2.2.1/lib/rspec/core/runner.rb:41:in run'
from /home/kazu/opt/ruby-trunk/lib/ruby/gems/1.9.1/gems/rspec-core-2.2.1/lib/rspec/core/runner.rb:10:in
block in autorun'

=end

#3 Updated by Nobuyoshi Nakada over 3 years ago

  • Status changed from Assigned to Closed

=begin
どうしようもないと思うのですが、何かアイデアがあれば。
=end

#4 Updated by Kazuhiro NISHIYAMA over 3 years ago

=begin
--help ではなく http://www.rubyist.net/~rubikitch/archive/zshcomplete.txt のように --zshcomplete (と --bashcomplete) にするというのはどうでしょうか?
=end

Also available in: Atom PDF