Open zzhou1 opened 6 months ago
2. Similar, to provide meta-data description completion, for example,
crm configure property stonith-timeout= <TAB><TAB>
Should be impossible to show the description at non-interactive mode
Like
# crm configure property dc-deadtime=
dc-deadtime (time, [20s]): How long to wait for a response from other nodes during start-up
The optimal value will depend on the speed and load of your network and the type of switches used.
The cursor will be positioned after the string
At interactive mode, the description will be shown in a loop
crm(live/15sp5-2)configure# property dc-deadtime=
dc-deadtime (time, [20s]): How long to wait for a response from other nodes during start-up
The optimal value will depend on the speed and load of your network and the type of switches used.
crm(live/15sp5-2)configure# property dc-deadtime=
That's why we wrote this condition https://github.com/ClusterLabs/crmsh/blob/master/crmsh/ui_configure.py#L228
I'm inclined to show help info for that property after the command failed, instead to show help info with
alp-1:~ # crm configure property no-quorum-policy=
ERROR: syntax in property: Empty value for no-quorum-policy is not allowed parsing 'property no-quorum-policy='
# Add help info here for no-quorum-policy
alp-1:~ # crm configure property no-quorum-policy
ERROR: syntax in property: Unknown arguments: no-quorum-policy near <no-quorum-policy> parsing 'property no-quorum-policy'
# Add help info here for no-quorum-policy
Few more findings:
Can we provide bash completion for
crm configure property <TAB><TAB>
? Just like the interactive mode which is very good.Similar, to provide meta-data description completion, for example,
crm configure property stonith-timeout= <TAB><TAB>
crm configure property --help
could be revised accordingly to use the above approach instead of referring tocrm ra info
Originally posted by @liangxin1300 in https://github.com/ClusterLabs/crmsh/issues/1379#issuecomment-2058172211