sublimehq / sublime_merge

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

Open multiple repositories at once with `smerge` CLI utility #1538

Open jonpalmisc opened 2 years ago

jonpalmisc commented 2 years ago

Problem description

When using the smerge CLI utility, only one repo can be opened at once. Additional arguments are ignored. For example, smerge repo_foo repo_bar only opens repo_foo.

Preferred solution

It would be best if smerge repo_foo repo_bar ... would open all the repos passed as arguments.

Alternatives

A shell alias/function is easily written:

function smerge-all() {
    for repo in $@; do smerge $repo; done
}
direc85 commented 1 year ago

As someone who works with 10+ repositories daily, opening them one-by-one is tedious whenever I manage to do something that makes Sublime Merge forget the opened repositories. Opening multiple targets works with Sublime Text already, and I've been using that heavily, too!

Bonus feature request: Add --clear flag or something to close all open repos, and opening the listed repos from the command arguments. This would make it very handy to replace one set of repos with another set, using terminal aliases for example!

virtualstaticvoid commented 7 months ago

I found this script works to open multiple repositories together into a new window.

#!/bin/bash

smerge <repo-1> --launch-or-new-window
smerge <repo-2>
...
smerge <repo-N>

Replace <repo-X> with the directory paths of each repository.