knqyf263 / pet

Simple command-line snippet manager
MIT License
4.44k stars 223 forks source link

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

Closed sgutwein closed 6 months ago

sgutwein commented 2 years ago

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 commented 2 years ago

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

jkldrr commented 2 years ago

+1

jaroslawhartman commented 2 years ago

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 commented 2 years ago

hey, guys. I support this in PR #203

RamiAwar commented 7 months ago

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