sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
276 stars 14 forks source link

Support for numbered/concatenated arguments and char escaping #1938

Open sbusceti opened 4 months ago

sbusceti commented 4 months ago

Problem description

Hi, I want to add a custom commands to generate a changelog based on git log.

This is the command I use to generate changelog:

git log --oneline --no-merges --pretty=format:"%s" START_TAG...END_TAG

I tried with this command:

[ { "caption": "Changelog", "command": "git", "args": { "argv": [ "log", "--oneline", "--no-merges", "--pretty=format:\"%s\"", "$select_tag", "...", "$select_tag" ] } } ] but there are two problems:

  1. sublime merge adds whitespace betweeen arguments, so "three dots" between tags wont work
  2. pretty-format requires quotation marks

Preferred solution

Add the ability to write arguments in a sintax like this:

"$select_tag_1...$select_tag_2" or "$select_tag...$select_tag" but in this last solution sublimeMerge has to differentiate inputs

dpjohnst commented 4 months ago

Hi @sbusceti,

Thanks for reporting this issue.

Regarding the quotation marks, you should be able to just escape the quotes like so: "--pretty=format:\"%s\"",

Unfortunately Sublime Merge doesn't yet support adding multiple different selectors in a single argument. It is something I have wanted to add for a while, so I will be looking into it and will keep you updated!

Kind regards, - Dylan from Sublime HQ