[
https://issues.apache.org/jira/browse/IGNITE-20179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksandr updated IGNITE-20179:
-------------------------------
Description:
We have several command options that should accept a list of strings, for
example {{cluster init --cmg-nodes}}. cmg-nodes can accept a single sting,
string with comma-separated node names without a space, and finally, can be
repeated.
Imagine you are a user that types a command
{{[defaultNode]> cluster init --cluster-name my --meta-storage-node defaultNode
--cmg-node defaultNode, defaultNode2}}
And get the error:
Unmatched argument at index 7: 'defaultNode2'
That is not clear what is wrong but the reason is that you typed a space before
comma.
I suggest rethinking the way CLI supports lists of strings and offering a more
user-friendly solution. Probably, we have to redefine our own jline3 parser. I
would expect and least a clear error message about what is wrong and how to fix
it.
Another challenge here is to improve autocompletion in interactive mode.
Imagine I want to use <TAB> completion against a cluster of two nodes node1 and
node2:
{{[defaultNode]> cluster init --cluster-name my --meta-storage-node <TAB1>node1
--meta-storage-no}}
> CLI should provide user-friendly list options
> ---------------------------------------------
>
> Key: IGNITE-20179
> URL: https://issues.apache.org/jira/browse/IGNITE-20179
> Project: Ignite
> Issue Type: Task
> Components: cli
> Affects Versions: 3.0.0-beta1
> Reporter: Aleksandr
> Priority: Major
> Labels: ignite-3, ignite-3-cli-tool
>
> We have several command options that should accept a list of strings, for
> example {{cluster init --cmg-nodes}}. cmg-nodes can accept a single sting,
> string with comma-separated node names without a space, and finally, can be
> repeated.
> Imagine you are a user that types a command
> {{[defaultNode]> cluster init --cluster-name my --meta-storage-node
> defaultNode --cmg-node defaultNode, defaultNode2}}
> And get the error:
> Unmatched argument at index 7: 'defaultNode2'
> That is not clear what is wrong but the reason is that you typed a space
> before comma.
> I suggest rethinking the way CLI supports lists of strings and offering a
> more user-friendly solution. Probably, we have to redefine our own jline3
> parser. I would expect and least a clear error message about what is wrong
> and how to fix it.
> Another challenge here is to improve autocompletion in interactive mode.
> Imagine I want to use <TAB> completion against a cluster of two nodes node1
> and node2:
> {{[defaultNode]> cluster init --cluster-name my --meta-storage-node
> <TAB1>node1 --meta-storage-no}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)