Thank you so much for the tip, I was finally looking at a way of doing that today after many years of frustration having xcode open when clicking on a .py file.
I made a little improvement to add the line number only if it's present (otherwise a single + takes you to the end of the file):
echo vim \1 $(if [[ "\2" =~ ^[0-9]+$ ]]; then echo "+\2";fi)
Thank you so much for the tip, I was finally looking at a way of doing that today after many years of frustration having xcode open when clicking on a .py file.
I made a little improvement to add the line number only if it's present (otherwise a single + takes you to the end of the file):