bruno icon indicating copy to clipboard operation
bruno copied to clipboard

feat: Add variables auto completion

Open MasterLambaster opened this issue 1 year ago • 4 comments

Description

Add autocomplete for environment variables.

https://github.com/usebruno/bruno/assets/134304/701515eb-9e95-4571-89f5-ef71ec33eb5f

The trigger is {{ that shows all available environment variables. Supports all fields that have collection passed to it, i.e auth, headers etc. Might need sanity check for all the places where it's currently applied. Fixes #1141, #606, #412.

Contribution Checklist:

  • [x] The pull request only addresses one issue or adds one feature.
  • [x] The pull request does not introduce any breaking changes
  • [x] I have added screenshots or gifs to help explain the change if applicable.
  • [x] I have read the contribution guidelines.
  • [x] Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

MasterLambaster avatar Apr 27 '24 18:04 MasterLambaster

I am having a little bug:

image

You can reproduce with the collection under /bruno/packages/bruno-tests/collection with environment prod

The suggested value "process" shouldn't be here.

Also I don't think, you should display the value of the variable. It will display secrets on the screen, which is not good in terms of security.

end3rbyte avatar May 01 '24 08:05 end3rbyte

@busy-panda process is an nested object that could be accessed, normally via dot notation. It's only visible if it's actually set. Regarding hiding values: there are couple existing issues for the hiding secret values and it should be done on the global level rather this particular case.

MasterLambaster avatar May 08 '24 07:05 MasterLambaster

Nice job, this should be included in the following releases.

acuenca-facephi avatar May 14 '24 15:05 acuenca-facephi