Skip to content

Feat: Have the ability to add multiple values for the same optional variable #979

@Darks1de42

Description

@Darks1de42

Is your feature request related to a problem? Please describe.
It is not possible to define a variable several times.
For example, applications that make web Requests have the possibility to define Headers.
To do this the flag has to be defined for every header:

-H "Authorization Bearer: <token>" -H "Content-Type: <type>"

Describe the solution you'd like
it would be good if you could specify a variable several times.
And to make that variable and only define these headers when and how often you need that you can define something in your cheat file like that:

curl <header:multiple> example.com

And then in navi you can define the same header multiple times if needed.
This has the advantage, that you don't have to define multiple commands in navi for every flag combination you need.
And it also covers cases that you didn't had in mind during the creation of the command in the cheat file.

This could result for example in one of the following commands:

curl -H "Authorization Bearer: <token>" example.com
curl -H "Content-Type: <type>" example.com
curl -H "Authorization Bearer: <token>" -H "Content-Type: <type>" example.com
curl example.com

Describe alternatives you've considered
It can maybe be solved together with #887

Metadata

Metadata

Assignees

Labels

new featureNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions