figspec - consider moving `script` definitions and suggestions into core azd completions
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
As a V2 improvement, I would love if we could move [the `script` definition here](https://github.com/Azure/azure-dev/pull/5955#discussion_r2466810594) back into core azd completions. If we did this, we would keep the `postProcess` around because that is still useful:
-----------------------------
It may be worth creating an issue to move [these completions](https://github.com/Azure/azure-dev/pull/5955#discussion_r2466820939) into core azd, and avoid the ownership here in figspec.
The most native way is when to pull out the flag completion funcs defined in cobra as below:
```golang
cmd.RegisterFlagCompletionFunc("mode", func(
cmd *cobra.Command, args []string, toComplete string,
) ([]string, cobra.ShellCompDirective) {
return []string{"dev", "staging", "prod"}, cobra.ShellCompDirectiveNoFileComp
})
```
_Originally posted by @weikanglim in https://github.com/Azure/azure-dev/pull/5955#discussion_r2466810594 and https://github.com/Azure/azure-dev/pull/5955#discussion_r2466820939_
Contributor guide
Assessment
This issue has not been assessed yet.