Discussion:
How to invoke meld on OSX the same way git does from the command line.
Russell Jarvis
2016-08-02 01:10:16 UTC
Permalink
Hi everyone,

First of all I would like to thank the community for creating and
maintaining Meld. It is by far my favourite graphical merge tool. It also
provides the only graphical merge flow that instantly made sense to me.

I have configured git to invoke meld when it needs to merge. Some how git
is able to launch meld with two files as an argument. I would like to be
able to also launch meld with two files as an argument explicitly. As often
I want to diff files for other reasons than a git merge. When I launch meld
from the command line in Apple it ignores any command line arguments I give
it, so I am wondering how can I find the code that git merge uses to invoke
it? I have tried searching the git source code on github but to evail.

Thanks for your help.
Russell.
Youssef A. Abou-Kewik
2016-08-02 12:10:51 UTC
Permalink
Russel,

After installing Meld to the /Applications folder, add the following to
your .bashrc

alias meld="/Applications/Meld.app/Contents/MacOS/Meld"

One done, you can start a terminal and use meld from the command line as
you normally would in Linux.

Check this for more details: https://github.com/yousseb/meld/issues/20

Regards,
Youssef
Post by Russell Jarvis
Hi everyone,
First of all I would like to thank the community for creating and
maintaining Meld. It is by far my favourite graphical merge tool. It also
provides the only graphical merge flow that instantly made sense to me.
I have configured git to invoke meld when it needs to merge. Some how git
is able to launch meld with two files as an argument. I would like to be
able to also launch meld with two files as an argument explicitly. As often
I want to diff files for other reasons than a git merge. When I launch meld
from the command line in Apple it ignores any command line arguments I give
it, so I am wondering how can I find the code that git merge uses to invoke
it? I have tried searching the git source code on github but to evail.
Thanks for your help.
Russell.
_______________________________________________
meld-list mailing list
https://mail.gnome.org/mailman/listinfo/meld-list
Russell Jarvis
2016-08-09 22:21:03 UTC
Permalink
Hi Youssef,

Great thanks for your help. This alias helps a lot, however it only works
if you use absolute paths to the files that you want meld to open.

For instance after defining said alias

$meld `pwd`/file1.py `pwd`/file2.py # works

However this is still not as graceful as one would like. I tried defining a
bash function in .profile instead, but invoking meld this way also does not
produce the intended behaviour.

function meld {
/Applications/Meld.app/Contents/MacOS/Meld $@
}
Post by Youssef A. Abou-Kewik
Russel,
After installing Meld to the /Applications folder, add the following to
your .bashrc
alias meld="/Applications/Meld.app/Contents/MacOS/Meld"
One done, you can start a terminal and use meld from the command line as
you normally would in Linux.
Check this for more details: https://github.com/yousseb/meld/issues/20
Regards,
Youssef
Post by Russell Jarvis
Hi everyone,
First of all I would like to thank the community for creating and
maintaining Meld. It is by far my favourite graphical merge tool. It also
provides the only graphical merge flow that instantly made sense to me.
I have configured git to invoke meld when it needs to merge. Some how git
is able to launch meld with two files as an argument. I would like to be
able to also launch meld with two files as an argument explicitly. As often
I want to diff files for other reasons than a git merge. When I launch meld
from the command line in Apple it ignores any command line arguments I give
it, so I am wondering how can I find the code that git merge uses to invoke
it? I have tried searching the git source code on github but to evail.
Thanks for your help.
Russell.
_______________________________________________
meld-list mailing list
https://mail.gnome.org/mailman/listinfo/meld-list
Youssef A. Abou-Kewik
2016-08-10 11:02:40 UTC
Permalink
Russel,

Latest version of Meld for OSX has resolved the issue of relative paths.
Are you sure you're using latest version?

Regards,
Youssef
Post by Russell Jarvis
Hi Youssef,
Great thanks for your help. This alias helps a lot, however it only works
if you use absolute paths to the files that you want meld to open.
For instance after defining said alias
$meld `pwd`/file1.py `pwd`/file2.py # works
However this is still not as graceful as one would like. I tried defining
a bash function in .profile instead, but invoking meld this way also does
not produce the intended behaviour.
function meld {
}
Post by Youssef A. Abou-Kewik
Russel,
After installing Meld to the /Applications folder, add the following to
your .bashrc
alias meld="/Applications/Meld.app/Contents/MacOS/Meld"
One done, you can start a terminal and use meld from the command line as
you normally would in Linux.
Check this for more details: https://github.com/yousseb/meld/issues/20
Regards,
Youssef
Post by Russell Jarvis
Hi everyone,
First of all I would like to thank the community for creating and
maintaining Meld. It is by far my favourite graphical merge tool. It also
provides the only graphical merge flow that instantly made sense to me.
I have configured git to invoke meld when it needs to merge. Some how
git is able to launch meld with two files as an argument. I would like to
be able to also launch meld with two files as an argument explicitly. As
often I want to diff files for other reasons than a git merge. When I
launch meld from the command line in Apple it ignores any command line
arguments I give it, so I am wondering how can I find the code that git
merge uses to invoke it? I have tried searching the git source code on
github but to evail.
Thanks for your help.
Russell.
_______________________________________________
meld-list mailing list
https://mail.gnome.org/mailman/listinfo/meld-list
Loading...