Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CDA4E200C8C for ; Tue, 6 Jun 2017 10:13:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CCCA5160BC6; Tue, 6 Jun 2017 08:13:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 20BF2160BC3 for ; Tue, 6 Jun 2017 10:13:21 +0200 (CEST) Received: (qmail 59626 invoked by uid 500); 6 Jun 2017 08:13:21 -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 59614 invoked by uid 99); 6 Jun 2017 08:13:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2017 08:13:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C40D71A08DE for ; Tue, 6 Jun 2017 08:13:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ZpQkQpicWKbB for ; Tue, 6 Jun 2017 08:13:20 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E7B495FDE2 for ; Tue, 6 Jun 2017 08:13:18 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6E2DCE002B for ; Tue, 6 Jun 2017 08:13:18 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 29BE921E0A for ; Tue, 6 Jun 2017 08:13:18 +0000 (UTC) Date: Tue, 6 Jun 2017 08:13:18 +0000 (UTC) From: "Rubin Simons (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CLI-217) Optional partial matching for long options MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 06 Jun 2017 08:13:23 -0000 [ https://issues.apache.org/jira/browse/CLI-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16038338#comment-16038338 ] Rubin Simons edited comment on CLI-217 at 6/6/17 8:12 AM: ---------------------------------------------------------- I was wondering why this issue didn't make it into 1.4. I'm affected by this issue in combination with combined options (like described in #216). Example: {code} Usage: foo [-c | -e | -h | -l | -s | -v] [-d] -c,--check Check configuration settings. -d,--debug Turn on debug messages. -e,--extract Extract data from rdbms into csv files. -h,--help Show this usage text. -l,--load Load csv files into neo4j. -s,--setup Configure settings interactively. -v,--version Show the version. {code} Specifying "-dc" passes debug and check to the application. However, specifying "-de" does not pass debug and extract to the application but is instead interpreted as a "long option", even though a single minus sign is used. was (Author: rubin): I was wondering why this issue didn't make it into 1.4. I'm affected by this issue in combination with combined options (like described in #216). Example: {{ Usage: foo [-c | -e | -h | -l | -s | -v] [-d] -c,--check Check configuration settings. -d,--debug Turn on debug messages. -e,--extract Extract data from rdbms into csv files. -h,--help Show this usage text. -l,--load Load csv files into neo4j. -s,--setup Configure settings interactively. -v,--version Show the version. }} Specifying "-dc" passes debug and check to the application. However, specifying "-de" does not pass debug and extract to the application but is instead interpreted as a "long option", even though a single minus sign is used. > Optional partial matching for long options > ------------------------------------------ > > Key: CLI-217 > URL: https://issues.apache.org/jira/browse/CLI-217 > Project: Commons CLI > Issue Type: Improvement > Components: Parser > Affects Versions: 1.3 > Reporter: Emmanuel Bourg > Attachments: CLI-217.patch, optPartialMatch.patch > > > DefaultParser support partial long options (i.e --ver matches --version if there is no ambiguity), but for some cases it might be necessary to disable this feature. -- This message was sent by Atlassian JIRA (v6.3.15#6346)