Skip to content

Conversation

@Pearl1594
Copy link
Contributor

Fixes: #90
This PR adds a config parameter - autocomplete which defaults to true, but when set to false, turns of auto-completion of arg/parameter values. NOTE: Argument/Parameter name / API name auto-completion still happens.

$ go run cmk.go
Apache CloudStack 🐵 CloudMonkey 6.1.0
Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues

(test) 🐱 > set autocomplete true
(test) 🐱 > 
(test) 🐱 > list accounts id=
04660396-f89e-4d44-a251-0e24176b4b85 (ACSUser)                                                       27e0711a-cf5a-4ecc-8f90-39b794eee2e1 (baremetal-system-account)                                      
3ae0e9b2-d162-4c43-bb3a-241d6cb4f02a (test-a-TestKubernetesCluster-JKHRZF)                           7596929a-f6b6-11eb-9ff7-1e00d500016d (admin)      

                                                   
(test) 🐱 > set autocomplete false
(test) 🐱 > list accounts id=
// Hitting tab doesn't provide list of account ids as it usually does when auto-completion is true

@shwstppr
Copy link
Contributor

shwstppr commented Aug 9, 2021

@Pearl1594 is it possible to turn it off only for values? Probably that is reporter's concern in the issue for a big environment

@Pearl1594
Copy link
Contributor Author

@shwstppr autocomplete config parameter affects only listing of argument values, and irrespective of its value, auto-completion will still work for API names and arguments.

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. API param values are not shown on tab press

@rohityadavcloud
Copy link
Member

LGTM cc @serverchief

@rohityadavcloud
Copy link
Member

@Pearl1594 @shwstppr can you test for case where in the cmk config file the new parameter is not define, how does it behave? (for backward compatibility if param is not defined in config we should treat it as true)

@Pearl1594
Copy link
Contributor Author

Seems like it was an issue when the config wasn't defined. Fixed it - autocomplete now defaults to true if not explicitly defined @rhtyd @shwstppr

@Pearl1594 Pearl1594 requested a review from shwstppr August 9, 2021 08:41
@rohityadavcloud rohityadavcloud merged commit 3293b74 into apache:main Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable auto-complete option

3 participants