I found this question while I was trying to install opendiff as a git diff and merge tool. The strange thing is that when I used echo opendiff $ 2 $ 5> opendiff-git.sh to create a script, the script did not contain the argument holders $ 2 $ 5, I added them manually and started working!
This team
echo opendiff $2 $5 > opendiff-git.sh
Result in opendiff-git.sh file containing
opendiff
I added two arguments to the $ 2 $ 5 placeholder manually
opendiff $2 $5
Created a shell script executable as suggested by knittl
chmod +x ~/opendiff-git.sh
And it works!
John
source share