Azure / Azure/azure-dev

figspec - consider moving `script` definitions and suggestions into core azd completions

Open
#6,114 0 comments 0 reactions 0 assignees View on GitHub
area/figspec area/vscode enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.