[
https://issues.jboss.org/browse/WFCORE-2283?page=com.atlassian.jira.plugi...
]
Jean-Francois Denise commented on WFCORE-2283:
----------------------------------------------
Hi [~weeks.c],
we are proposing here a way to help Wildly Command Line (CLI) users to identify the
required arguments when completing a management operation.
1) One way would be to "tag" exposed arguments to explicit their nature
(required vs optional) (eg: asterisk for mandatory, brackets for optional, colouring or
any other syntax element).
2) Another way would be to filter arguments. First expose required arguments then, once
the operation contains all the mandatory ones, expose optional ones.
The second way has today my preference (not a lot of practice of it, just raw prototyping
for now):
- No syntax marker to decode ("what this '*' means" kind of question)
- No confusion between what the completion exposes and what you get when selecting one of
these items (tag being removed in the selected argument).
- No need for colouring (that color blinds would not take benefit of). Color seems to me
not a good idea (specially in a command line/terminal context).
- More drive, the user is driven by the completer to choose arguments.
- Reduced amount of content exposed to the user.
- Allow for optimised cases. This is the case of a single required argument that would be
automatically inlined when completing for the first time, the completer would then propose
the list of optional arguments (if any).
- This is in line with some other part of the CLI where similar filtering is applied to
expose command options (as opposed to operation arguments discussed there).
With this approach we are loosing the flat list (that contains all arguments) that can be
seen as helpful to discover the whole set of arguments in a single <TAB> action when
you have both required and optional arguments. In this case you will discover them all but
in 2 steps.
Users could think that there are ONLY required attributes although the right way to
properly discover the set or operation arguments is by using the help command. help
describes the operation synopsis that contains details on required/optional arguments
(description and typing).
help extract:
help /subsystem=logging/logger=sun.rmi:list-add
SYNOPSIS
list-add(name=<a string>, [index=<an integer>], [value=<a string>])
If you are interested by discussing this topic, we could exchange more on it.
Thanks.
JF
Make 'required' attributes clearer when using tab completion
within CLI
-----------------------------------------------------------------------
Key: WFCORE-2283
URL:
https://issues.jboss.org/browse/WFCORE-2283
Project: WildFly Core
Issue Type: Feature Request
Components: CLI
Reporter: Darran Lofthouse
Assignee: Jean-Francois Denise
The following is some example output pressing tab to reveal the parameters of
'add': -
{{[standalone@localhost:9990 /] ./subsystem=elytron/key-store=localhost:add(
! alias-filter credential-reference path provider-name providers relative-to
required type }}
From this is it not clear which are actually required.
Suggestions to make it clearer: -
* Show required / optional in different colours.
* Add something to the required attributes e.g. '*'
* Add something to the optional requirements e.g. {optional_arg}
Maybe this can go one step further and take into account arguments already added by the
user, especially where attributes require another attribute or are an alternative.
Once an attribute is identified as being an alternative to another attribute maybe it
should be omitted altogether from the list or maybe also have something adding to it
!attr_name.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)