plugin-autocomplete icon indicating copy to clipboard operation
plugin-autocomplete copied to clipboard

fix: coTopics completion

Open jayree opened this issue 2 years ago • 2 comments

Change the behaviour of coTopic completion to complete commands and flags

jayree avatar Feb 23 '23 14:02 jayree

This issue has been linked to a new work item: W-12592066

git2gus[bot] avatar Feb 23 '23 14:02 git2gus[bot]

Hey @jayree, sorry for the late reply.

I've been testing this and found one issue with _values:

For flags that take a value, _values inserts a = between the flag name and its value , that seems to make _arguments unable to parse the flag and keeps suggesting it after completing the second flag (which shoud only happen if flag.multiple=true).

Top: sfdx with autocomplete using you branch Bottom: current zsh autocomplete

I've looked at the docs and haven't found any options to change the = sign being inserted (values -s ' ' doesn't work as expected).

If the first flag doesn't have an =, then _arguments is able to parse it (0:28 in the video)

https://user-images.githubusercontent.com/6853656/233685976-f11bcbfa-e038-4bc8-af76-0e77785b4cf6.mov

Still, IMO, this improves UX vs the current implementation (which makes it hard for new users to discover commands when the id is a coTopic). I'll check with my team again and let you know.

cristiand391 avatar Apr 21 '23 16:04 cristiand391