From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D9DE4318E; Tue, 17 Oct 2023 19:06:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A697242E1A; Tue, 17 Oct 2023 19:02:52 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 38B6342DDC for ; Tue, 17 Oct 2023 19:02:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697562170; x=1729098170; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=K8e5cifForspF7x9lg96JDe0Wryvwgng31NqY9MI4c4=; b=kcHzMnvrXiV3pi5A6gtj6jNLJQXuYAiZIfxmulAuPiJgPWUfnfoccRe1 L7yzHr9AmRZDPJMdfoM4e/6zrQ+Q+1Xg5Rdp+EPQJ1mRMFPoNJwsrsofO Cbes2ICmx+wk+GJxJzDFBr7F3TzkPjFcbA7+H0D1JGdXAPHoyPcMVWsKC yDivKXEW4k4BlScSgLF/BqqSaSNhfyjOcHwYPznnX1R+Rg58uToR0luhX J+InqWIxz1uzZRIXx49lwgcNRjE45Pckm9TmASiSj921xy1Yijm5K/EBM wQQ/4kAn+qd9m4CM9XYUyzimuIvE4K9yhDf2St2i2i11XeL5BpUv6Uocn w==; X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="383057756" X-IronPort-AV: E=Sophos;i="6.03,232,1694761200"; d="scan'208";a="383057756" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 10:02:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="826511568" X-IronPort-AV: E=Sophos;i="6.03,232,1694761200"; d="scan'208";a="826511568" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Oct 2023 10:02:38 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 17 Oct 2023 10:02:37 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Tue, 17 Oct 2023 10:02:37 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Tue, 17 Oct 2023 10:02:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jEdzcqumqOs9AvqaXbBL0F4/u0blHMN/05Vgikl3MVS0ncAUnDnJoqy9P3UlwBjogSraCH5eABdqgbj/9PK313csuFzrsnDGfeVKhMmIywufBTOaOXPJ8UoeMvmMfOUA2Y5kd7fpnR8Pwb39qh/Jkz7DbFSatqUxkyfGNjUeQ5BqqpUhHEmWJ1TRJJHQs/c1O1bVtvO4CCVzbgOeMe+Jyjg9jCWDFsx+hesTU6E0ig4oim1m7KR/7FkW0lmwZEZnEFSogTGpYkPaNX3RQMPgn1IsuoKN44O7cr2ZMQMELNi9LT/lwb6ydzpM9q+ixSMQtHuOw+gIOn1nlRfnEDnKYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q+xWizeVX/vZdLNFKvdI9C71Yd1FVqKY7o8tePxBEnk=; b=jE6EBcYxU37HLrMKrs6Aqh+sD0vYXTiBV+egVOblQmW+fNDy0UQAtcjeZrDg3T129mnUclVVWjjVMWNXpAmmQ1R8tUJuz1r/s+ltPpzW0dvXLBYPrBgF2B4H9evO5/XD/rVDvN+k5P7B7Azyk9jAfeFCuCYn7dAVDVcKGqzjQ/xisECP351LMmLbHSuDejcTGeZw+AgcHU3WSn6XL7yF2eZQeREf/COsYeQJQMlHlTXKSgwdkuN78+JCHIjTpalR7q/kQxewR51PMRSW6bA/tK6tYmuV2QhDZqDBSH8B/yiEUT3mfTNEK5Mn2Es5ZEns0+R02MkkJOsIbjYVqYPKGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH8PR11MB6780.namprd11.prod.outlook.com (2603:10b6:510:1cb::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.34; Tue, 17 Oct 2023 17:02:19 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::68fb:c3f4:75e7:5fb5]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::68fb:c3f4:75e7:5fb5%4]) with mapi id 15.20.6886.034; Tue, 17 Oct 2023 17:02:19 +0000 Date: Tue, 17 Oct 2023 18:02:14 +0100 From: Bruce Richardson To: David Marchand CC: , Subject: Re: [PATCH v4 0/7] document and simplify use of cmdline Message-ID: References: <20230802170052.955323-1-bruce.richardson@intel.com> <20231016140612.664853-1-bruce.richardson@intel.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: DB3PR06CA0006.eurprd06.prod.outlook.com (2603:10a6:8:1::19) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH8PR11MB6780:EE_ X-MS-Office365-Filtering-Correlation-Id: 5308254d-7bd4-49b0-7410-08dbcf32d2c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +GYa5Qzu4yPnJ2v7eXhZTzbrPwTCyEHBERuW2vxG7KIIKXIo1iZrbZ/UoE0VtWQmKiALnpDqtR/8P5WdabosEQbSlAGhcDhJeSPQUvS1sHGpvkwPR/eduwTA972odn+DxYLEw0Z3cHOSLc33B/otxIbm5utSzEB55fQReXJkW60bHz1vJsbGEV+cvfImSe8hATUKLgQ8y7kFqSw4AO1AcaxpjnkTT3K5gaNnX55pzsfAEqT0TAU4fdineUPLuDGbyLaHciCZdRTqX6zT6Yt1v3Rg07fnT/wddm6zjgZ0/BiZwJ1iAU8D/kjXecoV+akISn5PR+9Vf+hR76jqcp3cpW7oXYfmQXonK7PD0oVz7P4VP7duJc/0o3kUNfdtOqXTkwCiFCB5swkb/4Ro056/E063CjBudg5itWHsov1XDgHo3nzR5hPFx4tPwnbEzuDF/rAdDwAp51KPRp37oxCsidl5qBNP6gUawVnrGC5uvwgQC0a+c/i+tuygzAx1+zKEW+dxvrfcegV+80aUP0pnqUc3BqyEZ/R+Ghu6SFtixJcVYgtWdZtwPk7LTv/ZtCXh X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(376002)(366004)(346002)(39860400002)(396003)(230922051799003)(451199024)(64100799003)(1800799009)(186009)(6486002)(478600001)(66946007)(66476007)(6666004)(66556008)(6916009)(83380400001)(82960400001)(38100700002)(6512007)(316002)(6506007)(26005)(53546011)(5660300002)(86362001)(41300700001)(44832011)(2906002)(4326008)(8936002)(8676002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ckFkZVYxOVZnSlFjWGhxYysyNHRRdnF1ZmltRkYya1dJckNCWUQzSUZSWUgx?= =?utf-8?B?ancwcytVUlFRQndoSGMrZkY4NkJsbSthU2s1eUNpUEJiS2tpTFVpWlF5VzRJ?= =?utf-8?B?RjN2bzBNSUlsRkVGOUFKc1R4YmVGcFNVYTZ4RWFEK21PRUxDZWFlK29SUGF4?= =?utf-8?B?bzdKY2szcjcydnh2V0hkaEx4eDJpQXhReVVQdEtWZWJ4Y1JKdGRCbXUyOEl3?= =?utf-8?B?THR6Z3dSM0VnTGFtdkJlUUdPODlBN1lVb0ZncHNyN1hLeUVWVmN1UUdvRTk5?= =?utf-8?B?TzdPTWd5ZTFrZVJNd1ZTeEpDQjA5dXFPOEcxWWV4YnVKaU1rK09PdkpMVkFL?= =?utf-8?B?bm5vT1BMdXFheHYvTnV6ejZ1b3YwNy9Jbys2Q25hS0lGYlpjMzZTYTUrRGx6?= =?utf-8?B?SENRZkNUd3FxdjNHdmhnQlMrQ05UbXFnaWhUQlIxcTdQY2g0RUhyL084UEkr?= =?utf-8?B?UXJKQUpRZkNQcjlzb1k5ckZ3Y0tQOHdzS0RjUGo5RVJ5VVJSbTBVZ1RkRW1L?= =?utf-8?B?RmY1WW5OcEVQNW9vcEpVSTIvM1VWZDBnK25JaDV1RFhSSGpYYmFzV2NwNm4r?= =?utf-8?B?ajREL2pIN1A5cGRVb1FOVUlmNjNMcDlWT1FudGJPVFV4bk1oUGlJdUo0MEsy?= =?utf-8?B?WWVpZDBtU1pid2VEZW4xdEhEOHYyTVJkOTVvK2hFL1c1N1Z6ZzhseGkyWXJl?= =?utf-8?B?ZVVvNzgvVllGMGl2NDJIRW5ZNzdydnlDSERUckNTbDR4bnJONmdDZG1RSXFa?= =?utf-8?B?c1JnbGxJdVhyeUVmNUVBQUtVaFpFZk5zajNEM0x4S2d1VU1Rc1hpL01UU01P?= =?utf-8?B?UGNodkdOTTBWbnozY1cwNThsU0h1RVN2S0twYjlrdkdtV1Y1UFVzam5pYXVK?= =?utf-8?B?cmQzQmVtOTZndGV4RmNzL21vZjd4dDE4c3N2dDJqdkpHWWZaOWdiVFRQL3NK?= =?utf-8?B?ck9nZmVWY2R3Um1OZ1h3VjRQYWt5RzJBRW0vc2hrdFh3NWJIbTFGOGZHRzNl?= =?utf-8?B?bnVvbkdvcXAvZ3NqSTZpRFlWazZOY3hWSjcwQWpVRy9ZVVl1VzBSTHgvd21M?= =?utf-8?B?N21nZ1N2V0J4YWVXamgvVEc2d1FxNlRpZ1RQY0U0WVVtdG9uUGJXcmROcFh1?= =?utf-8?B?aitpd1F4N1g4STJlOXlNN0pvQ21SV0crbUZLVFczb213T2Rmc3U3bG1XbnJu?= =?utf-8?B?N0hLeGN5aEl6MXpHWHUwVlYwdUp1NjJaOTJpVjcwYjdNbGNTTzRHRUIzZjhn?= =?utf-8?B?N2hRdngwbTVWU3hTQ3ZZb04yWXZVNVlqN05TQ2JqSzNXUTFvMmxYa2UzRmQ0?= =?utf-8?B?dlZwNU9tMy9UVFFqMGM4enpsSjJWSGxTci95c3UxU0Fma1Q2OVVHT1YrcDlK?= =?utf-8?B?SWlpbEQvMkptRkRZNDludzZqZTNkN29uVktDblpWS1hsNWpkSnd6OUZVWnVB?= =?utf-8?B?VWl3QjhsYy9oWFFZZ3EzTFJDemtIZnFWcHY1WjVFQ1R6RGxTRk1JeHl2UHpu?= =?utf-8?B?RTc3SG4vWTBGVU1ISmo2MTk0d2t3YWJVRjNvZVNhT1psd3dlVmp2NG84bUhW?= =?utf-8?B?QzBMWDBlQlZCcEpnWjl5ZjRhQmlaWlFDTHJucWUzdFAwamVWdUczVmE4NTZW?= =?utf-8?B?b2FVSzNRUndSZ2x6NHV1cm1ld2dkenJpWXRYZXpTanNpNUpvd3BiVi9zdmVm?= =?utf-8?B?bENOQ1RpdnJHWC9rRHJSVlRNQTlBb3h1ak1RTUVDSzdWY0tNWXNHeFVSOFpW?= =?utf-8?B?cWlFSTdXeHRuOGNiampFV1RUaUUya2oxZ1VsN0J1S05MdGwxQm5WMXZ6TjQ4?= =?utf-8?B?bzBVLzFXbHhZNHY4dmdHUTBaY2dvRXlMQzFKdWd3dnFYZlRoYjVuNE9BYmcx?= =?utf-8?B?azVsb2hGUzg1Wm8yc0t6cnlPL1FDMXh5V2tHUjZiUzJITnFPZFQrRm5HL0Zp?= =?utf-8?B?OWF0VlRGVTlRc2wyWXJkQ1c2TTlDMng3QVFMZStWK1pzK0g5SkwvNGlRcEYr?= =?utf-8?B?NnBnbWk0S09CaHhnRkJYaEFkek9kVlBkUi9FVkJHNVhEQU82SnZsOXZUTlRj?= =?utf-8?B?YU1pazZaa1VGY3pYenBmQ2owa09wVU9PbXJhN2dkbk1jMFhlTlBVU3lJU2cz?= =?utf-8?B?M1Q1aWFyZ0JkeDBVRDgwNzNTcmNRYlB5elJhcnYwM2p4YVZVZmNQTm0xNjFh?= =?utf-8?B?NHc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 5308254d-7bd4-49b0-7410-08dbcf32d2c6 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 17:02:19.7169 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Je8L9MkqrtpNU4IeUTo7c4uljtEAOT2uJMK04+bOYaPcGW3wu5jxgEEKcRwDjqwZWAxvW4fhzFSOzrRnlF9slbnUVqNrw88CFMZhXRWDuBo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6780 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Oct 17, 2023 at 06:23:47PM +0200, David Marchand wrote: > On Tue, Oct 17, 2023 at 10:29 AM Bruce Richardson > wrote: > > > > > > - testpmd accepts both "help" and "help
" commands. > > > But the cmdline library does not provide a way (afair) for specifiying > > > this "optional" aspect. > > > > > > And it can't be expressed with this series current syntax since > > > generated symbols would conflict if we ask for two "help" commands. > > > > > > My quick hack was to introduce a way to select the prefix of the > > > generated symbols. > > > There may be a better way, like finding a better discriminant for > > > naming symbols... > > > But, on the other hand, the symbols prefix might be something a > > > developer wants to control (instead of currently hardcoded cmd_ > > > prefix). > > > > > > @@ -20,6 +20,12 @@ def process_command(tokens, cfile, comment): > > > """Generate the structures and definitions for a single command.""" > > > name = [] > > > > > > + prefix, sep, cmd_name = tokens[0].partition(':') > > > + if cmd_name: > > > + tokens[0] = cmd_name > > > + else: > > > + prefix = 'cmd' > > > + > > > if tokens[0].startswith('<'): > > > print('Error: each command must start with at least one > > > literal string', file=sys.stderr) > > > sys.exit(1) > > > > > > (etc... I am not copying the rest of the diff) > > > > > > I then used as: > > > > > > cmd_brief:help # help: Show help > > > help section # help: Show help > > > > > > > Interesting. I actually had no plans to even consider moving something like > > testpmd over. However, this is an interesting one, though I'm not really > > Given the extensive use of the cmdline library in testpmd, it is a > good way to identify the limits of this series :-). > It is indeed. That was never meant to be the target of this series, rather it was to make writing new apps simpler. However, if we have a path to getting there, then I suppose we might as well continue. > > > sure I like it that much as a feature :-) I rather like having unique > > prefixes for each command. I wasn't actually aware of the testpmd "help > >
" command at all. I will have to look into it. > > Let me propose an alternative hack. > I mentionned previously that we could have a better namespace / > discriminant for those symbols, and it seems easier than I thought: > > @@ -25,8 +25,10 @@ def process_command(tokens, cfile, comment): > sys.exit(1) > for t in tokens: > if t.startswith('<'): > - break > - name.append(t) > + t_type, t_name = t[1:].split('>') > + name.append(t_name) > + else: > + name.append(t) > name = '_'.join(name) > > result_struct = [] > > With this, any command implementation symbol has the full chain of > token names as a prefix which will ensure there is no conflict. > WDYT? > I actually think I like this less than the previous proposal. :-( The main reason for that is that we would need to decide immediately whether to go with this or not, as it would break compatibility with what is already proposed - because the function and struct names would get longer. The other scheme you proposed had the advantage that it could at least be adopted later. It also had the advantage that it was largely invisble except for the non-trivial cases that needed it. > help # help: Show help > help section # help: Show help > > Results in: > > cmd_help_parsed(void *parsed_result, struct cmdline *cl, void *data); > struct cmd_help_result { > static cmdline_parse_token_string_t cmd_help_help_tok = > TOKEN_STRING_INITIALIZER(struct cmd_help_result, help, "help"); > static cmdline_parse_inst_t cmd_help = { > .f = cmd_help_parsed, > (void *)&cmd_help_help_tok, > > And: > > cmd_help_section_parsed(void *parsed_result, struct cmdline *cl, void *data); > struct cmd_help_section_result { > static cmdline_parse_token_string_t cmd_help_section_help_tok = > TOKEN_STRING_INITIALIZER(struct cmd_help_section_result, help, "help"); > static cmdline_parse_token_string_t cmd_help_section_section_tok = > TOKEN_STRING_INITIALIZER(struct cmd_help_section_result, section, NULL); > static cmdline_parse_inst_t cmd_help_section = { > .f = cmd_help_section_parsed, > (void *)&cmd_help_section_help_tok, > (void *)&cmd_help_section_section_tok, > > > > > > > > > > - Multi choice fixed strings is something that is often used in > > > testpmd, like here, in the help
command. > > > Here is my quick hack: > > > > > > diff --git a/buildtools/dpdk-cmdline-gen.py b/buildtools/dpdk-cmdline-gen.py > > > index 3b41fb0493..e8c9e079de 100755 > > > --- a/buildtools/dpdk-cmdline-gen.py > > > +++ b/buildtools/dpdk-cmdline-gen.py > > > @@ -35,7 +35,11 @@ def process_command(tokens, cfile, comment): > > > for t in tokens: > > > if t.startswith('<'): > > > t_type, t_name = t[1:].split('>') > > > - t_val = 'NULL' > > > + if len(t_type.split('(')) == 2: > > > + t_type, t_val = t_type.split('(') > > > + t_val = '"' + t_val.split(')')[0] + '"' > > > + else: > > > + t_val = 'NULL' > > > else: > > > t_type = 'STRING' > > > t_name = t > > > @@ -113,7 +117,7 @@ def process_commands(infile, hfile, cfile, ctxname): > > > continue > > > if '#' not in line: > > > line = line + '#' # ensure split always works, even if > > > no help text > > > - tokens, comment = line.split('#', 1) > > > + tokens, comment = line.rsplit('#', 1) > > > instances.append(process_command(tokens.strip().split(), > > > cfile, comment.strip())) > > > > > > print(f'static __rte_used cmdline_parse_ctx_t {ctxname}[] = {{') > > > > > > > > > Which translates as: > > > cmd_brief:help # help: Show help > > > help section # help: Show help > > > > > > > +1 > > I was actualy thinking that adding support for multi-choice fixed strings > > is something we should add. One thought that I had was that "#" is not a > > particularly good choice of separator here. While, as you show, it can be > > made to work; I think - since we are defining our own syntax here - that it > > would be both simpler for the script, and simpler for the user, to have "|" > > as the option separator. It should be familiar for everyone as an option > > separator from regexes, unlike "#" which is more familar for comments. > > > > So what about: > > help <|all|control|display|config|ports|>section > > I don't like using | as it gives the false impression regexp are supported... > I'm not sure it does particularly. The bit that struck me was that if you look at the help texts for the commands that take multiple options, they all give the options separated with "|". Therefore, it seems logical to also use that in command specifiers too. > > > > > By starting with the separator, we should avoid having to provide the > > STRING type at all. > > ... and as a consequence, I find <|all confusing, it is like an empty > value would be acceptable. > I'm ok to drop the initial and terminating |, if that is what the issue is - or else I'm misunderstanding things. For example: help section > > About skipping the token type for such lists, I had considered it, but > I thought other types took an optional list of allowed values... > Now looking at the cmdline types, it is not the case. > Maybe I mixed with some other cli framework I played with in the past... > > All of this to say, ok for me to omit the type. > Good. However, it only works if we come up with a suitable separator character to detect to split on. I don't like "#" as separator as it is used so many places as a comment character. What about bracketed, comma-separated lists? help <(all,control,display,config,ports)>section > > > > > To my previous point on not liking to have a prefix-specifier, the > > alternative to making testpmd work with the script is to tweak very > > slightly the "help
". > > > > help # show general help > > help on <|all|control|display|config|ports|>section > > > > By making the command "help on ports" rather than "help ports" we would > > avoid the need for the prefix syntax. > > There are other cases where a "chain of command" returns the value of > a parameter. > And the same parameter may be set via "chain of command value". > Ok, let me think on it a bit.... /Bruce