From issues-return-10027-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Tue Sep 22 18:30:43 2009 Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 60790 invoked from network); 22 Sep 2009 18:30:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Sep 2009 18:30:42 -0000 Received: (qmail 1424 invoked by uid 500); 22 Sep 2009 18:30:42 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 1296 invoked by uid 500); 22 Sep 2009 18:30:41 -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 1286 invoked by uid 99); 22 Sep 2009 18:30:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2009 18:30:41 +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; Tue, 22 Sep 2009 18:30:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 25D81234C48C for ; Tue, 22 Sep 2009 11:30:18 -0700 (PDT) Message-ID: <1308961739.1253644218153.JavaMail.jira@brutus> Date: Tue, 22 Sep 2009 11:30:18 -0700 (PDT) From: "Grzegorz Solecki (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (CLI-188) Adding the another hyphen code 96. In-Reply-To: <1385197198.1253643979078.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-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Grzegorz Solecki updated CLI-188: --------------------------------- I see that after commiting an issue the JIRA engine had replaced those two diffrent hyphens so I have attached the file to show them. > Adding the another hyphen code 96. > ---------------------------------- > > Key: CLI-188 > URL: https://issues.apache.org/jira/browse/CLI-188 > Project: Commons CLI > Issue Type: Improvement > Components: Parser > Affects Versions: 1.0, 1.1, 1.2 > Reporter: Grzegorz Solecki > Priority: Trivial > Fix For: 1.3 > > > In the class Parser (rev 680644) close to line 190 there is code: > \\ > \\ > {code:title=Parser.java} > // the value is an option > else if (t.startsWith("-")) > { > {code} > This line recognizes hyphen like - > But sometimes (when someone has to work with MS Word Docs) this hyphen - can be used instead of -. > So I would like to suggest just adding a simple piece of code like: > \\ > \\ > {code:title=Parser.java} > // the value is an option > else if (t.startsWith("-") || t.startsWith("-")) > { > {code} > or try to throw an exception like "Option expected not " or "unexpected argument". -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.