Snipline 0.10.1 brings an improvement to Multi-Choice Presets.

Multi-Choice Presets allow you to predefine multiple options for your dynamic variables.

Example of a Multi-Choice Preset
Example of a Multi-Choice Preset

The below example shows a snippet for cURL requests piped into the jq tool.

curl '#{[URL=https://]}' -X '#select{[Type=GET,POST,DELETE,PUT]}' -H 'Authorization: Bearer #{[Auth=]}' | jq > #{[File=test]}.json

Prior to 0.10.1 it was not possible to escape commas in the multi-choice options which means you can’t have a comma in an option’s text.

It is now possible to escape commas with backslash \,.

echo '#select{[Name=option without comma,option with\, comma!]}'

Thanks to @masukomi on Twitter for finding this issue.

There will be updates to Snipline CLI and Snipbar that include this functionality in the near future so stay tuned!