Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support multiple default values for params #192

Closed
sgutwein opened this issue Feb 7, 2022 · 5 comments
Closed

[Feature Request] Support multiple default values for params #192

sgutwein opened this issue Feb 7, 2022 · 5 comments
Labels
feature-request Feature Request

Comments

@sgutwein
Copy link

sgutwein commented Feb 7, 2022

Would be nice to have the option to define multiple default params. After executing the command it should be possible to choose between them.

E.g. <stage=dev;qa;prod> or something similar.

@smartmic
Copy link

smartmic commented Feb 7, 2022

+1 and (or alternatively) it would be also great if there is the option to show a short description/hint for every parameter.

@jkldrr
Copy link

jkldrr commented Feb 8, 2022

+1

@jaroslawhartman
Copy link

jaroslawhartman commented Mar 10, 2022

It would be also something absolutely fantastic to build this list from a result of another script, for example

[[snippets]]

description = "Activate gcloud configuration"
command  =  "gcloud config configurations activate <param_command=gcloud config configurations list>"

Then in execution window a small list to select out of the param_commands.

Best regards,
Jarek

hitzhangjie added a commit to hitzhangjie/pet that referenced this issue May 23, 2022
This CL supports multiple default values like <proxy=cfg1|cfg2|cfg3>,
this parameter will rendered like this in `generateView`:

```
--proxy=cfg1|cfg2|cfg3----------------------------------
|cfg1                                                  |
|cfg2                                                  |
|cfg3                                                  |
|------------------------------------------------------
```

then we can use up/down arrow to select the wanted item, after press
`enter` evaluateResult will be executed.

This CL also let the parameter view's title use larger width.

close knqyf263#192
@hitzhangjie
Copy link

hey, guys. I support this in PR #203

@RamiAwar RamiAwar added the feature-request Feature Request label Jan 29, 2024
@RamiAwar
Copy link
Collaborator

Only concern with this I'd say is the choice of the separator. ; is used in bash to separate commands, | is used a LOT in different commands so that's definitely a no-go.

We just need to find the best character (least used, unrelated to bash) to be used as a separator. @hitzhangjie @sgutwein

Repository owner locked and limited conversation to collaborators Jan 30, 2024
@RamiAwar RamiAwar converted this issue into discussion #247 Jan 30, 2024
@RamiAwar RamiAwar reopened this Feb 2, 2024
@RamiAwar RamiAwar closed this as completed Mar 5, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
feature-request Feature Request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants