Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 89423 invoked from network); 25 Oct 2009 19:58:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Oct 2009 19:58:23 -0000 Received: (qmail 52001 invoked by uid 500); 25 Oct 2009 19:58:23 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 51904 invoked by uid 500); 25 Oct 2009 19:58:23 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 51746 invoked by uid 99); 25 Oct 2009 19:58:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Oct 2009 19:58:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Oct 2009 19:58:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9CB2A234C04C for ; Sun, 25 Oct 2009 12:57:59 -0700 (PDT) Message-ID: <1782404566.1256500679640.JavaMail.jira@brutus> Date: Sun, 25 Oct 2009 19:57:59 +0000 (UTC) From: "Piotr Repetowski (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (CLI-189) "Unexpected --help while processing" In-Reply-To: <1078284765.1254132855986.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CLI-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769857#action_12769857 ] Piotr Repetowski commented on CLI-189: -------------------------------------- This is not a bug. First you should add help option to the group: \\ \\ {code} DefaultOptionBuilder obuilder = new DefaultOptionBuilder(); Option help = obuilder.withLongName("help").create(); group.withOption(help); // Your code {code} \\ Kind regards. > "Unexpected --help while processing" > ------------------------------------ > > Key: CLI-189 > URL: https://issues.apache.org/jira/browse/CLI-189 > Project: Commons CLI > Issue Type: Bug > Components: CLI-2.x, Help formatter > Affects Versions: 2.0 > Environment: snapshot jar > Reporter: Guillaume Perrot > > The help trigger feature seems not working. > When I pass --help to the command line, I have "Unexpected --help while processing", then usage is printed. > Code snippet: > {code:java} > Parser parser = new Parser(); > parser.setGroup(group); > parser.setHelpFormatter(new HelpFormatter()); > parser.setHelpTrigger("--help"); > parser.parseAndHelp(args); > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.