command-linemeldfile-comparison

Open new tab in existing meld instance via a command line


Is there a way to start new file comparison in an existing meld instance with a command line (like terminal) or programmatically.


For example, following two commands start two instances of meld

$ meld ./1/a1.txt ./2/a2.txt &
$ meld ./3/a3.txt ./4/b4.txt &

However, I'd prefer both file comparisons were opened in same instance in different tabs. I don't know the way to obtain it, but I can illustrate what I mean.

I assume that it possible to modify second command (meld ./3/a3.txt ./4/b4.txt &). For example it can help some unknown option,

$ meld --some-option-to-open-in-tab ./3/a3.txt ./4/b4.txt &

or maybe it's possible to write some application that added a file comparison to existing instance of meld

$ MyMeld ./3/a3.txt ./4/b4.txt &

Solution

  • There is -n undocumented option (or --newtab)

    $ meld ./1/a1.txt ./2/a2.txt &
    $ meld -n ./3/a3.txt ./4/b4.txt &